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: <ynkpfuncsontf576wjq6fpru2742xx7xqrnvdiadzuoazrucpg@hw3q3bjjwfiz>
Date: Fri, 23 Jan 2026 13:46:06 +0200
From: Ioana Ciornei <ioana.ciornei@....com>
To: Haoxiang Li <lihaoxiang@...c.iscas.ac.cn>
Cc: chleroy@...nel.org, dan.carpenter@...aro.org, 
	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org, suhui@...china.com
Subject: Re: [PATCH v2] bus: fsl-mc: fix an error handling in
 fsl_mc_device_add()

On Fri, Jan 23, 2026 at 07:35:29PM +0800, Haoxiang Li wrote:
> Hi, Ioana:
> 
> On Fri, 23 Jan 2026 13:10:46 +0200, Ioana Ciornei wrote:
> > Is there any reason why you didn't go with Christophe's suggestion from
> > https://lore.kernel.org/all/b7f7e968-a683-4e1e-8ccc-5dd19f0f15c5@kernel.org/ ?
> 
> > It's perfectly valid to call put_device() even though device_add() was
> > not called, meaning from the other code paths.
> 
> Actually, I totally agree with that suggestion. However, I submit a same fix
> several months ago and got a reply:
> https://lore.kernel.org/all/2025052622-nautical-suitably-486c@gregkh/
> 
> I didn't figure out why.

I think the problem was that the patch did not apply because commit
d694bf8a9acd ("bus: fsl-mc: fix double-free on mc_dev") was already
applied.

> And if you agree with the Christophe's suggestion,
> I will resubmit a patch v3.

Yes, I do agree with Christophe's suggestion. I even tested a bit that
both cases, with and without device_add() getting called, resources are
released properly if you use put_device().

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ