mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] EDAC/ie31200: Disable PCI device when probing fails
@ 2026-09-13 21:25 Myeonghun Pak
  2026-09-14 16:51 ` Luck, Tony
  0 siblings, 1 reply; 5+ messages in thread
From: Myeonghun Pak @ 2026-09-13 21:25 UTC (permalink / raw)
  To: Jason Baron
  Cc: Borislav Petkov, Tony Luck, linux-edac, linux-kernel, Ijae Kim

ie31200_init_one() enables the PCI device before calling ie31200_probe1().
If probing fails, it returns without balancing the successful enable,
leaving the PCI enable count elevated.

Call pci_disable_device() on that failure path. This also covers the
direct ie31200_init_one() call from the module initialization fallback,
while preserving the existing return values and successful probe path.

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

Assisted-by: OpenAI:GPT-5.6
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/ie31200_edac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/edac/ie31200_edac.c b/drivers/edac/ie31200_edac.c
index 6f5fdf43e7732cd23d54dc8392caed4ca7990fcd..88af77ee07fe367f692a89dd55f188aefe912e44 100644
--- a/drivers/edac/ie31200_edac.c
+++ b/drivers/edac/ie31200_edac.c
@@ -660,7 +660,9 @@ static int ie31200_init_one(struct pci_dev *pdev,
 	if (pci_enable_device(pdev) < 0)
 		return -EIO;
 	rc = ie31200_probe1(pdev, (struct res_config *)ent->driver_data);
-	if (rc == 0 && !mci_pdev)
+	if (rc)
+		pci_disable_device(pdev);
+	else if (!mci_pdev)
 		mci_pdev = pci_dev_get(pdev);
 
 	return rc;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] EDAC/ie31200: Disable PCI device when probing fails
  2026-09-13 21:25 [PATCH] EDAC/ie31200: Disable PCI device when probing fails Myeonghun Pak
@ 2026-09-14 16:51 ` Luck, Tony
  2026-09-15  0:53   ` Borislav Petkov
  0 siblings, 1 reply; 5+ messages in thread
From: Luck, Tony @ 2026-09-14 16:51 UTC (permalink / raw)
  To: Myeonghun Pak, Jason Baron
  Cc: Borislav Petkov, linux-edac, linux-kernel, Ijae Kim

> ie31200_init_one() enables the PCI device before calling ie31200_probe1().
> If probing fails, it returns without balancing the successful enable,
> leaving the PCI enable count elevated.
>
> Call pci_disable_device() on that failure path. This also covers the
> direct ie31200_init_one() call from the module initialization fallback,
> while preserving the existing return values and successful probe path.
>
> This issue was identified during our ongoing static-analysis research while
> reviewing kernel code.
>
> Assisted-by: OpenAI:GPT-5.6

I added "LLM" to this tag based on current guidance in Documentation/process/coding-assistants.rst

> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>

Applied. Thanks.

-Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] EDAC/ie31200: Disable PCI device when probing fails
  2026-09-14 16:51 ` Luck, Tony
@ 2026-09-15  0:53   ` Borislav Petkov
  2026-09-17 18:18     ` Myeonghun Pak
  0 siblings, 1 reply; 5+ messages in thread
From: Borislav Petkov @ 2026-09-15  0:53 UTC (permalink / raw)
  To: Luck, Tony; +Cc: Myeonghun Pak, Jason Baron, linux-edac, linux-kernel, Ijae Kim

On Mon, Sep 14, 2026 at 04:51:07PM +0000, Luck, Tony wrote:
> > Assisted-by: OpenAI:GPT-5.6
> 
> I added "LLM" to this tag based on current guidance in Documentation/process/coding-assistants.rst

Nah, it needs to be only LLM:

"Assisted-by: LLM"

because

commit 816d9992d9ed434ec52cfbd63080d518e535a41b
Author: Christian Brauner <brauner@kernel.org>
Date:   Wed Jul 1 17:54:48 2026 +0200

    coding-assistants: simplify attribution
    
    The requirement to identify specific models used in the Assisted-by tag
    provides free advertising to proprietary software companies while adding
    little or no useful information.  Change the requirement to simply:
    
      Assisted-by: LLM
    
    to capture the fact that an LLM was used without tracking which one.

Lemme fix it up.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] EDAC/ie31200: Disable PCI device when probing fails
  2026-09-15  0:53   ` Borislav Petkov
@ 2026-09-17 18:18     ` Myeonghun Pak
  2026-09-17 18:41       ` Borislav Petkov
  0 siblings, 1 reply; 5+ messages in thread
From: Myeonghun Pak @ 2026-09-17 18:18 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Luck, Tony, Jason Baron, linux-edac, linux-kernel, Ijae Kim

Thanks, Tony and Boris, for applying the patch and fixing the tag.
I'll use "Assisted-by: LLM" in future submissions.

Best regards,
Myeonghun Pak

2026년 9월 14일 (월) 오후 8:53, Borislav Petkov <bp@alien8.de>님이 작성:
>
> On Mon, Sep 14, 2026 at 04:51:07PM +0000, Luck, Tony wrote:
> > > Assisted-by: OpenAI:GPT-5.6
> >
> > I added "LLM" to this tag based on current guidance in Documentation/process/coding-assistants.rst
>
> Nah, it needs to be only LLM:
>
> "Assisted-by: LLM"
>
> because
>
> commit 816d9992d9ed434ec52cfbd63080d518e535a41b
> Author: Christian Brauner <brauner@kernel.org>
> Date:   Wed Jul 1 17:54:48 2026 +0200
>
>     coding-assistants: simplify attribution
>
>     The requirement to identify specific models used in the Assisted-by tag
>     provides free advertising to proprietary software companies while adding
>     little or no useful information.  Change the requirement to simply:
>
>       Assisted-by: LLM
>
>     to capture the fact that an LLM was used without tracking which one.
>
> Lemme fix it up.
>
> --
> Regards/Gruss,
>     Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] EDAC/ie31200: Disable PCI device when probing fails
  2026-09-17 18:18     ` Myeonghun Pak
@ 2026-09-17 18:41       ` Borislav Petkov
  0 siblings, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2026-09-17 18:41 UTC (permalink / raw)
  To: Myeonghun Pak; +Cc: Luck, Tony, Jason Baron, linux-edac, linux-kernel, Ijae Kim

On Thu, Sep 17, 2026 at 02:18:39PM -0400, Myeonghun Pak wrote:
> Thanks, Tony and Boris, for applying the patch and fixing the tag.
> I'll use "Assisted-by: LLM" in future submissions.

Also, for the future, do not top-post when replying on a public ML but put
your reply underneath the text you're replying to, like I just did.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-17 18:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-13 21:25 [PATCH] EDAC/ie31200: Disable PCI device when probing fails Myeonghun Pak
2026-09-14 16:51 ` Luck, Tony
2026-09-15  0:53   ` Borislav Petkov
2026-09-17 18:18     ` Myeonghun Pak
2026-09-17 18:41       ` Borislav Petkov

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®