Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@meta.com>
Cc: linux-nvme@lists.infradead.org, hch@lst.de,
	Keith Busch <kbusch@kernel.org>,
	Bjorn Helgaas <helgaas@kernel.org>
Subject: Re: [PATCH] nvme-pci: serialize polling interrupt queue with shutdown
Date: Fri, 15 May 2026 06:29:41 +0200	[thread overview]
Message-ID: <20260515042941.GB3433@lst.de> (raw)
In-Reply-To: <20260514144544.1752178-1-kbusch@meta.com>

On Thu, May 14, 2026 at 07:45:44AM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch@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?



      reply	other threads:[~2026-05-15  4:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14 14:45 [PATCH] nvme-pci: serialize polling interrupt queue with shutdown Keith Busch
2026-05-15  4:29 ` Christoph Hellwig [this message]

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=20260515042941.GB3433@lst.de \
    --to=hch@lst.de \
    --cc=helgaas@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-nvme@lists.infradead.org \
    /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