[PATCH 1/1] nvme-loop: do not cancel I/O and admin tagset during ctrl reset/shutdown
Christoph Hellwig
hch at lst.de
Fri Mar 20 00:59:48 PDT 2026
On Fri, Mar 13, 2026 at 05:08:48PM +0530, Nilay Shroff wrote:
> Cancelling the I/O and admin tagsets during nvme-loop controller reset
> or shutdown is unnecessary. The subsequent destruction of the I/O and
> admin queues already waits for all in-flight target operations to
> complete.
>
> Cancelling the tagsets first also opens a race window. After a request
> tag has been cancelled, a late completion from the target may still
> arrive before the queues are destroyed. In that case the completion path
> may access a request whose tag has already been cancelled or freed,
> which can lead to a kernel crash. Please see below the kernel crash
> encountered while running blktests nvme/040:
Looks good:
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the Linux-nvme
mailing list