[PATCH V3 8/8] nvme-core: warn on allocating admin tag set with existing queue
Daniel Wagner
dwagner at suse.de
Mon Apr 27 02:54:14 PDT 2026
On Fri, Apr 10, 2026 at 09:39:24AM +0200, Maurizio Lombardi wrote:
> Currently, nvme_alloc_admin_tag_set() silently drops and releases
> the existing admin_q if it called on a controller that already
> had one (e.g., during a controller reset).
>
> However, transport drivers should not be reallocating the admin tag
> set and queue during a reset. Dropping the old queue and allocating
> a new one destroys user-configured timeouts and may race against
> nvme_admin_timeout_store()
>
> Since all transport drivers are now expected to preserve the admin queue
> across resets, calling nvme_alloc_admin_tag_set() when ctrl->admin_q
> is already populated is a bug.
>
> Remove the silent cleanup and replace it with a WARN_ON_ONCE() to
> explicitly catch any transport drivers that violate this lifecycle rule
Looks good to me.
Reviewed-by: Daniel Wagner <dwagner at suse.de>
More information about the Linux-nvme
mailing list