Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: mhun512@gmail.com,ae878000@gmail.com,hch@lst.de,kbusch@kernel.org
Cc: <stable@vger.kernel.org>
Subject: FAILED: patch "[PATCH] nvme-pci: disable controller on admin queue IRQ setup failure" failed to apply to 6.1-stable tree
Date: Thu, 03 Sep 2026 17:01:46 +0200	[thread overview]
Message-ID: <2026090346-clang-google-039d@gregkh> (raw)


The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 08660a5c8d497f43191635d97efd31cd35051f15
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026090346-clang-google-039d@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'

Possible dependencies:



thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 08660a5c8d497f43191635d97efd31cd35051f15 Mon Sep 17 00:00:00 2001
From: Myeonghun Pak <mhun512@gmail.com>
Date: Wed, 15 Jul 2026 16:44:59 +0900
Subject: [PATCH] nvme-pci: disable controller on admin queue IRQ setup failure

nvme_pci_configure_admin_queue() enables the controller and then requests
the admin queue interrupt. If queue_request_irq() fails it returns without
disabling the controller, and no caller compensates: nvme_pci_enable() only
frees the IRQ vectors and calls pci_disable_device(), after which
nvme_dev_disable() treats the controller as dead and skips nvme_disable_ctrl().
The controller is left enabled (CC.EN set) on this error path.

Disable it in the failure path, while the PCI device is still enabled so the
CC.EN clear handshake completes.

This issue was identified during our ongoing static-analysis research while
reviewing kernel code.

Fixes: b60503ba432b ("NVMe: New driver")
Cc: stable@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 0bce364c7874..16d42e5138c8 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2414,6 +2414,7 @@ static int nvme_pci_configure_admin_queue(struct nvme_dev *dev)
 	result = queue_request_irq(nvmeq);
 	if (result) {
 		dev->online_queues--;
+		nvme_disable_ctrl(&dev->ctrl, false);
 		return result;
 	}
 


             reply	other threads:[~2026-09-03 15:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 15:01 gregkh [this message]
2026-09-09 17:06 ` [PATCH 6.1.y 1/5] nvme-pci: call nvme_pci_configure_admin_queue from nvme_pci_enable Sasha Levin
2026-09-09 17:06   ` [PATCH 6.1.y 2/5] nvme-apple: fix controller shutdown in apple_nvme_disable Sasha Levin
2026-09-09 17:06   ` [PATCH 6.1.y 3/5] nvme: use nvme_wait_ready in nvme_shutdown_ctrl Sasha Levin
2026-09-09 17:06   ` [PATCH 6.1.y 4/5] nvme: merge nvme_shutdown_ctrl into nvme_disable_ctrl Sasha Levin
2026-09-09 17:06   ` [PATCH 6.1.y 5/5] nvme-pci: disable controller on admin queue IRQ setup failure Sasha Levin

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=2026090346-clang-google-039d@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=ae878000@gmail.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=mhun512@gmail.com \
    --cc=stable@vger.kernel.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