[RFC v1 1/4] nvmet-trace: avoid dereferencing pointer too early
Hannes Reinecke
hare at suse.de
Wed Sep 6 04:00:19 PDT 2023
On 8/29/23 11:13, Daniel Wagner wrote:
> The first command issued from the host to the target is the fabrics
> connect command. At this point, neither the target queue nor the
> controller have been allocated. But we already try to trace this command
> in nvmet_req_init.
>
> Reported by KASAN.
>
> Signed-off-by: Daniel Wagner <dwagner at suse.de>
>
> ---
> drivers/nvme/target/trace.c | 6 +++---
> drivers/nvme/target/trace.h | 24 +++++++++++++-----------
> 2 files changed, 16 insertions(+), 14 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
More information about the Linux-nvme
mailing list