[PATCH v3] nvme-tcp: fix NULL queue->ctrl dereference on reconnect

Keith Busch kbusch at kernel.org
Wed Oct 28 07:53:18 PDT 2026


On Wed, Oct 28, 2026 at 11:33:43AM -0300, Christian Aurich Zanettini Martins wrote:
> +/*
> + * The I/O tag set is allocated, and grown on reconnect, before the queues are
> + * connected, so blk-mq can initialize requests on a queue, and dispatch to it,
> + * before nvme_tcp_alloc_queue() has run for it. Set up the fields that do not
> + * depend on the connection once, when allocating the controller, and keep them
> + * until the controller is freed.
> + */
> +static void nvme_tcp_init_queue(struct nvme_tcp_ctrl *ctrl, int qid)

The comment here has a weird cadance to it, with all the, comma
separated, thoughts. Something more succint like "Set queue fields that
don't depend on the connection" would suffice, but I don't think this
function needs additional explanation.

Anyway, no need to send a new version, I'll just remove it when
applying.



More information about the Linux-nvme mailing list