diff options
| author | Keith Busch <kbusch@kernel.org> | 2025-05-08 16:57:06 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-22 14:29:41 +0200 |
| commit | a3c147040bb25e267daf9deab611daff629c7ccf (patch) | |
| tree | 00b567df1d8b48d895a230670548e2b18cdb44a2 /drivers/nvme | |
| parent | ddfa034da3188825d0234f810681a18f1d443c1b (diff) | |
| download | linux-a3c147040bb25e267daf9deab611daff629c7ccf.tar.gz linux-a3c147040bb25e267daf9deab611daff629c7ccf.tar.bz2 linux-a3c147040bb25e267daf9deab611daff629c7ccf.zip | |
nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable
[ Upstream commit 3d8932133dcecbd9bef1559533c1089601006f45 ]
We need to lock this queue for that condition because the timeout work
executes per-namespace and can poll the poll CQ.
Reported-by: Hannes Reinecke <hare@kernel.org>
Closes: https://lore.kernel.org/all/20240902130728.1999-1-hare@kernel.org/
Fixes: a0fa9647a54e ("NVMe: add blk polling support")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/nvme')
| -rw-r--r-- | drivers/nvme/host/pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 504dc0538035..265b3608ae26 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1202,7 +1202,9 @@ static void nvme_poll_irqdisable(struct nvme_queue *nvmeq) WARN_ON_ONCE(test_bit(NVMEQ_POLLED, &nvmeq->flags)); disable_irq(pci_irq_vector(pdev, nvmeq->cq_vector)); + spin_lock(&nvmeq->cq_poll_lock); nvme_poll_cq(nvmeq, NULL); + spin_unlock(&nvmeq->cq_poll_lock); enable_irq(pci_irq_vector(pdev, nvmeq->cq_vector)); } |
