lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CY8PR11MB7134886BB103C40A284CD39E89C4A@CY8PR11MB7134.namprd11.prod.outlook.com>
Date: Tue, 4 Nov 2025 14:15:39 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>, Ma Ke <make24@...as.ac.cn>,
	"jbaron@...mai.com" <jbaron@...mai.com>, "bp@...en8.de" <bp@...en8.de>,
	"Luck, Tony" <tony.luck@...el.com>
CC: "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH] EDAC/ie31200: Fix error handling in ie31200_register_mci

> [...]
> > --- a/drivers/edac/ie31200_edac.c
> > +++ b/drivers/edac/ie31200_edac.c
> > @@ -528,6 +528,8 @@ static int ie31200_register_mci(struct pci_dev
> > *pdev, struct res_config *cfg, in
> >  fail_unmap:
> >  	iounmap(window);
> >  fail_free:
> > +	if (mc > 0)
> 
> Since both primary and secondary memory controllers invoke
> device_initialize(), please remove this "if (mc > 0)" check to call put_device()
> unconditionally here.
> 
> > +		put_device(&priv->dev);
> >  	edac_mc_free(mci);
> >  	return ret;
> >  }
> 

On the normal driver unloading path, a corresponding put_device() is also needed.
Please include the following diff in your v2.

diff --git a/drivers/edac/ie31200_edac.c b/drivers/edac/ie31200_edac.c
index 0aea6d59f31e..4c43d7dbe047 100644
--- a/drivers/edac/ie31200_edac.c
+++ b/drivers/edac/ie31200_edac.c
@@ -603,6 +603,7 @@ static void ie31200_unregister_mcis(void)
                mci = priv->mci;
                edac_mc_del_mc(mci->pdev);
                iounmap(priv->window);
+               put_device(&priv->dev);
                edac_mc_free(mci);
        }
 } 

Thanks!
-Qiuxu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ