From: Nilay Shroff <nilay@linux.ibm.com>
To: Guixin Liu <kanie@linux.alibaba.com>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Daniel Wagner <dwagner@suse.de>, Hannes Reinecke <hare@suse.de>
Cc: linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme-multipath: delete the ANATT timer after draining ana_work
Date: Wed, 25 Nov 2026 15:17:02 +0530 [thread overview]
Message-ID: <9c4eda4b-ea64-4aaa-a4c7-9673e0dbabd6@linux.ibm.com> (raw)
In-Reply-To: <20261124121349.1861269-1-kanie@linux.alibaba.com>
On 11/24/26 5:43 PM, 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.
>
> Fixes: 0d0b660f214d ("nvme: add ANA support")
> Cc:stable@vger.kernel.org
> Signed-off-by: Guixin Liu<kanie@linux.alibaba.com>
Looks good to me:
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
next prev parent reply other threads:[~2026-11-25 9:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 12:13 [PATCH] nvme-multipath: delete the ANATT timer after draining ana_work Guixin Liu
2026-11-24 12:22 ` sashiko-bot
2026-11-24 12:35 ` Guixin Liu
2026-11-25 5:16 ` Christoph Hellwig
2026-11-25 8:25 ` Hannes Reinecke
2026-11-25 9:47 ` Nilay Shroff [this message]
2026-11-30 15:56 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c4eda4b-ea64-4aaa-a4c7-9673e0dbabd6@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kanie@linux.alibaba.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox