Re: [RFC v1 1/4] nvmet-trace: avoid dereferencing pointer too early

Hannes Reinecke
2023-09-06T11:00:37Z

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@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@suse.de>

Cheers,

Hannes