[PATCH] nvme-multipath: delete the ANATT timer after draining ana_work
Keith Busch
kbusch at kernel.org
Mon Nov 30 07:56:52 PST 2026
On Tue, 24 Nov 2026 20:13:49 +0800, Guixin Liu wrote:
> nvme_mpath_stop() deletes the ANATT timer before cancelling ana_work.
> An ana_work that is already past its controller state check can still
> read the ANA log and arm the timer after the timer was deleted. The
> controller is then freed with the timer armed, and nvme_anatt_timeout()
> dereferences the freed controller when it fires.
>
> Cancel ana_work before deleting the timer so it cannot be armed again.
> Also delete the timer in nvme_mpath_uninit() after draining ana_work:
> commit 9b657c565984 ("nvme: stop asynchronous event work before ANA
> teardown") added the work drain there because ana_work has multiple
> producers and nvme_mpath_stop() is skipped once ana_log_buf is NULL.
> The timer needs the same treatment before the ANA resources are freed.
>
> [...]
Thanks, applied to nvme-7.4.
[1/1] nvme-multipath: delete the ANATT timer after draining ana_work
commit: 083775310ce4fa21fa80f82b852f85de05f30329
--
Keith Busch <kbusch at kernel.org>
More information about the Linux-nvme
mailing list