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: <d3c3c6b5-499a-4890-9829-ae39022fec87@lunn.ch>
Date: Thu, 24 Oct 2024 13:56:35 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Zhang Zekun <zhangzekun11@...wei.com>
Cc: justin.chen@...adcom.com, florian.fainelli@...adcom.com,
	andrew+netdev@...n.ch, davem@...emloft.net, o.rempel@...gutronix.de,
	kory.maincent@...tlin.com, horms@...nel.org, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
	chenjun102@...wei.com
Subject: Re: [PATCH net 1/2] net: bcmasp: Add missing of_node_get() before
 of_find_node_by_name()

On Thu, Oct 24, 2024 at 09:59:08AM +0800, Zhang Zekun wrote:
> of_find_node_by_name() will decrease the refcount of the device_node.
> So, get the device_node before passing to it.

This seems like an odd design. Why does it decrement the reference
count?

Rather than adding missing of_node_get() everywhere, should we be
thinking about the design and fixing it to be more logical?

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ