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

Jens Axboe axboe at kernel.dk
Wed Aug 21 06:44:35 PDT 2024


On 8/21/24 6:40 AM, 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.

Please add an appropriate fixes tag.

-- 
Jens Axboe





More information about the Linux-nvme mailing list