[PATCH] nvme-pci: serialize polling interrupt queue with shutdown

Christoph Hellwig hch at lst.de
Thu May 14 21:29:41 PDT 2026


On Thu, May 14, 2026 at 07:45:44AM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch at kernel.org>
> 
> Polling an interrupt driven completion queue temporarilly disables the
> irq. If this occurs concurrently with another thread disabling the
> device, the irq vector may have been freed, which makes it available for
> reuse. Reenabling the irq after polling the queue may be referencing a
> stale irq at that point.
> 
> Fix this race by ensuring nvme_poll_irqdisable() can not run
> concurrently with nvme_dev_disable(), and skip polling the completion
> queue if the queue has already been disabled.

Do we need the same change in nvme_suspend_queue?  I.e., should the check
and locking be moved into nvme_poll_irqdisable?




More information about the Linux-nvme mailing list