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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 22 Apr 2016 08:42:23 +1000
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	frowand.list@...il.com, Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Rob Herring <robh+dt@...nel.org>, Tony Lindgren <tony@...mide.com>,
	Scott Wood <oss@...error.net>,
	Kumar Gala <galak@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Arnd Bergmann <arnd@...db.de>,
	Grant Likely <grant.likely@...aro.org>,
	Jingoo Han <jingoohan1@...il.com>,
	Lee Jones <lee.jones@...aro.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	Tomi Valkeinen <tomi.valkeinen@...com>,
	"H. Nikolaus Schaller" <hns@...delico.com>,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [RFC/PATCH] of: of_find_node_by_name - stop dropping reference
 to 'from' node

On Thu, 2016-04-21 at 15:35 -0700, Frank Rowand wrote:
> No.  It is correct for of_find_by_name() to call of_node_put() for
> the from argument.  The callers should be fixed.

I would argue that if everybody makes the same mistake then our
interface is wrong. In that case I wrote it so I think I can plead
guilty to the mistake ;-)

In hindsight, but I don't have the stammina to do a tree-wide change, I
think we should have differenciated:

	of_find_xxx which does *not* drop the reference

	of_find_next_xxx which does

Cheers,
Ben.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ