[PATCH V2] nvmet-tcp: fix kernel crash if commands allocation fails

Keith Busch kbusch at kernel.org
Mon Aug 26 14:39:27 PDT 2024


On Wed, Aug 21, 2024 at 04:28:26PM +0200, Maurizio Lombardi wrote:
> If the commands allocation fails in nvmet_tcp_alloc_cmds()
> the kernel crashes in nvmet_tcp_release_queue_work() because of
> a NULL pointer dereference.
> 
>   nvmet: failed to install queue 0 cntlid 1 ret 6
>   Unable to handle kernel NULL pointer dereference at
>          virtual address 0000000000000008
> 
> Fix the bug by setting queue->nr_cmds to zero in case
> nvmet_tcp_alloc_cmd() fails.

Thanks, applied to nvme-6.11.



More information about the Linux-nvme mailing list