Occasional kernel error with NVMe-oF TCP target
Maurizio Lombardi
mlombard at redhat.com
Wed Aug 21 05:16:08 PDT 2024
st 21. 8. 2024 v 12:57 odesílatel Maurizio Lombardi
<mlombard at redhat.com> napsal:
>
> > Is the stack trace enough to go on? Is this already fixed in a newer
> > kernel? Do you need me to gather more information?
>
> The stack trace was more than sufficient, it's still reproducible on 6.11.0-rc4
> What happens is that the nvme-tcp failed to allocate sufficient memory
> for the commands and the
> queue release procedure dereferences a NULL pointer
>
This should be sufficient to fix the crash
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 5bff0d5464d1..b37506ad851f 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1534,6 +1534,7 @@ static int nvmet_tcp_alloc_cmds(struct
nvmet_tcp_queue *queue)
nvmet_tcp_free_cmd(cmds + i);
kfree(cmds);
out:
+ queue->nr_cmds = 0;
return ret;
}
Maurizio
More information about the Linux-nvme
mailing list