From: Myeonghun Pak <mhun512@gmail.com>
To: Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: [PATCH 2/3] EDAC/i3000: Balance PCI device enablement
Date: Mon, 14 Sep 2026 21:55:18 -0400 [thread overview]
Message-ID: <20260915015519.83833-3-mhun512@gmail.com> (raw)
In-Reply-To: <20260915015519.83833-1-mhun512@gmail.com>
i3000_init_one() leaves the PCI enable reference held when probing fails
and when the controller is removed. Disable the device on probe failure
and after removing the EDAC controller. Keep explicit cleanup because
module initialization can call i3000_init_one() outside PCI driver binding.
This issue was identified during our ongoing static-analysis research
while reviewing kernel code.
Fixes: 535c6a53035d ("drivers/edac: new inte 30x0 MC driver")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
drivers/edac/i3000_edac.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c
--- a/drivers/edac/i3000_edac.c
+++ b/drivers/edac/i3000_edac.c
@@ -461,6 +461,8 @@ static int i3000_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
return -EIO;
rc = i3000_probe1(pdev, ent->driver_data);
+ if (rc)
+ pci_disable_device(pdev);
if (!mci_pdev)
mci_pdev = pci_dev_get(pdev);
@@ -480,7 +482,9 @@ static void i3000_remove_one(struct pci_dev *pdev)
if (!mci)
return;
edac_mc_free(mci);
+
+ pci_disable_device(pdev);
}
static const struct pci_device_id i3000_pci_tbl[] = {
next prev parent reply other threads:[~2026-09-15 1:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 1:55 [PATCH 0/3] EDAC: Balance PCI device enablement in three Intel drivers Myeonghun Pak
2026-09-15 1:55 ` [PATCH 1/3] EDAC/e752x: Use managed PCI device enablement Myeonghun Pak
2026-09-15 1:55 ` Myeonghun Pak [this message]
2026-09-15 1:55 ` [PATCH 3/3] EDAC/x38: Balance " Myeonghun Pak
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=20260915015519.83833-3-mhun512@gmail.com \
--to=mhun512@gmail.com \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tony.luck@intel.com \
/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
all inboxes | Powered by JetHome®