[PATCH v2] nvme: reject a controller type change on reinitialization
Keith Busch
kbusch at kernel.org
Mon Nov 30 07:56:52 PST 2026
On Wed, 25 Nov 2026 23:59:02 +0900, Yehyeong Lee wrote:
> nvme_init_identify() caches id->cntrltype on every initialization, and the
> Identify Controller data is read again on every reconnect. A fabrics
> controller that reported itself as an I/O controller on the first connect
> can therefore report itself as an administrative controller on a reconnect,
> after its namespaces are in use.
>
> nvme_init_ctrl_finish() then overrides queue_count to 1, so the transport
> skips I/O queue setup and the queues that error recovery freed are never
> reallocated, leaving queue->sock NULL. The controller is switched to LIVE
> anyway with the namespaces still present, and nvme_check_ready() lets any
> request through once the state is LIVE, so blk-mq dispatches to the freed
> queue:
>
> [...]
Thanks, applied to nvme-7.4.
[1/1] nvme: reject a controller type change on reinitialization
commit: b7fa6736fdffd4a04ba18f4c96d926b4e96b66a5
--
Keith Busch <kbusch at kernel.org>
More information about the Linux-nvme
mailing list