[PATCH 1/5] nvmet: fix wrong error handling approach in nvmet_install_queue

Sagi Grimberg sagi at grimberg.me
Wed Dec 13 05:45:57 PST 2023


>> On Wed, Dec 13, 2023 at 02:32:48PM +0800, Guixin Liu wrote:
>>> In the nvmet_install_queue() function, do not set the ctrl pointer
>>> to NULL if the sqsize check fails.
>> Can you explain why it is wrong, and why not doing it is desirable?
> 
> If a queue which is already connected, then receive a connect cmd with 
> sqsize=0, it will set the
> 
> req->sq->ctrl to NULL and break the queue.

It is not clear what is the issue here. Is there a dereference later on
in sq->ctrl? It belongs in the change log.



More information about the Linux-nvme mailing list