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]
Date:	Thu, 16 Jul 2015 09:28:10 -0700
From:	Tony Lindgren <tony@...mide.com>
To:	Paul Walmsley <paul@...an.com>
Cc:	SF Markus Elfring <elfring@...rs.sourceforge.net>,
	BenoƮt Cousson <bcousson@...libre.com>,
	Russell King <linux@....linux.org.uk>,
	linux-arm-kernel@...ts.infradead.org, linux-omap@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] ARM: OMAP2: Delete unnecessary checks before three
 function calls

* Paul Walmsley <paul@...an.com> [150716 07:09]:
> On Wed, 15 Jul 2015, Tony Lindgren wrote:
> 
> > * Paul Walmsley <paul@...an.com> [150715 22:58]:
> > > Hello Markus
> > > 
> > > On Tue, 30 Jun 2015, SF Markus Elfring wrote:
> > > 
> > > > From: Markus Elfring <elfring@...rs.sourceforge.net>
> > > > Date: Tue, 30 Jun 2015 14:00:16 +0200
> > > > 
> > > > The functions clk_disable(), of_node_put() and omap_device_delete() test
> > > > whether their argument is NULL and then return immediately.
> > > > Thus the test around the call is not needed.
> > > > 
> > > > This issue was detected by using the Coccinelle software.
> > > > 
> > > > Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> > > 
> > > Thanks for the patch.  I have to say, I am a bit leery about applying the 
> > > omap_device.c and omap_hwmod.c changes, since the called functions -- 
> > > omap_device_delete() and clk_disable() -- don't explicitly document that 
> > > NULLs are allowed to be passed in.  So there's no explicit contract that 
> > > callers can rely upon, to (at least in theory) prevent those internal NULL 
> > > pointer checks from being removed.
> > > 
> > > So I would suggest that those two functions' kerneldoc be patched first to 
> > > explicitly state that passing in a NULL pointer is allowed.  Then I would 
> > > feel a bit more comfortable applying the omap_device.c and omap_hwmod.c 
> > > changes.
> > > 
> > > The kerneldoc for of_node_put() does explicitly allow NULLs to be passed 
> > > in.  So I'll apply that change now for v4.3, touching up the commit 
> > > message accordingly.
> > 
> > I have them applied from a later thread already, but will drop both in
> > my branch as I have not pushed them out yet.
> 
> Oops sorry about stepping on your toes - I obviously missed that followup.

No problem :)

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ