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] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ebbc75e-6450-464b-8c65-7f8b1f752fbd@lunn.ch>
Date: Mon, 30 Sep 2024 22:10:25 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Javier Carrasco <javier.carrasco.cruz@...il.com>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Yisen Zhuang <yisen.zhuang@...wei.com>,
	Salil Mehta <salil.mehta@...wei.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] net: mdio: switch to scoped
 device_for_each_child_node()

On Mon, Sep 30, 2024 at 10:03:29PM +0200, Javier Carrasco wrote:
> There has already been an issue with the handling of early exits from
> device_for_each_child() in this driver, and it was solved with commit
> b1de5c78ebe9 ("net: mdio: thunder: Add missing fwnode_handle_put()") by
> adding a call to fwnode_handle_put() right after the loop.
> 
> That solution is valid indeed, but if a new error path with a 'return'
> is added to the loop, this solution will fail. A more secure approach
> is using the scoped variant of the macro, which automatically
> decrements the refcount of the child node when it goes out of scope,
> removing the need for explicit calls to fwnode_handle_put().

Hi Javier

I know you are going across the whole tree, multiple sub systems, and
each has its own rules. I think naming patches is however pretty
uniform across the tree. Do what other patches did:

d84fe6dc7377 net: mdio: thunder: Add missing fwnode_handle_put()
a93a0a15876d net: mdio: thunder: Fix a double free issue in the .remove function

netdev has some additional documentation you should read:

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

The change itself looks O.K, its just the processes which need work.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ