From 71f29969f6c6aecb52aefffd1c521f8d4d6fc173 Mon Sep 17 00:00:00 2001 From: Daniel Wagner <dwagner@suse.de> Date: Jun 02 2025 09:48:26 +0000 Subject: nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable (git-fixes bsc#1223096). --- diff --git a/patches.suse/nvme-pci-acquire-cq_poll_lock-in-nvme_poll_irqdisabl.patch b/patches.suse/nvme-pci-acquire-cq_poll_lock-in-nvme_poll_irqdisabl.patch new file mode 100644 index 0000000..6b7ebad --- /dev/null +++ b/patches.suse/nvme-pci-acquire-cq_poll_lock-in-nvme_poll_irqdisabl.patch @@ -0,0 +1,33 @@ +From: Keith Busch <kbusch@kernel.org> +Date: Thu, 8 May 2025 16:57:06 +0200 +Subject: nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable +Patch-mainline: v6.15-rc7 +Git-commit: 3d8932133dcecbd9bef1559533c1089601006f45 +References: git-fixes bsc#1223096 + +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> +Acked-by: Daniel Wagner <dwagner@suse.de> +--- + drivers/nvme/host/pci.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/nvme/host/pci.c ++++ b/drivers/nvme/host/pci.c +@@ -1106,7 +1106,9 @@ static void nvme_poll_irqdisable(struct + 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)); + } + diff --git a/series.conf b/series.conf index 21c9f4d..f23bf62 100644 --- a/series.conf +++ b/series.conf @@ -31885,6 +31885,7 @@ patches.suse/spi-tegra114-Use-value-to-check-for-invalid-delays.patch patches.suse/ACPI-PPTT-Fix-processor-subtable-walk.patch patches.suse/nvme-pci-make-nvme_pci_npages_prp-__always_inline.patch + patches.suse/nvme-pci-acquire-cq_poll_lock-in-nvme_poll_irqdisabl.patch patches.suse/nfs-handle-failure-of-nfs_get_lock_context-in-unlock-path.patch patches.suse/NFSv4-pnfs-Reset-the-layout-state-after-a-layoutreturn.patch patches.suse/drm-amd-display-Correct-the-reply-value-when-AUX-wri.patch