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, 2 Jul 2015 12:19:50 +0100
From:	Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
To:	Mark Brown <broonie@...nel.org>
Cc:	Maninder Singh <maninder1.s@...sung.com>, lgirdwood@...il.com,
	patches@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org,
	pankaj.m@...sung.com
Subject: Re: [PATCH v2] regulator: wm831x-dcdc: Use pointer after NULL check

On Thu, Jul 02, 2015 at 12:14:56PM +0100, Mark Brown wrote:
> On Thu, Jul 02, 2015 at 11:18:49AM +0100, Charles Keepax wrote:
> > On Thu, Jul 02, 2015 at 01:27:09PM +0530, Maninder Singh wrote:
> > > pdata is used before NULL check, so it looks misleading.
> 
> > The patch basically looks fine, but it feels a bit like needless
> > churn. The current code is perfectly correct and feels clear
> > enough to me.
> 
> It's a bug - either the validation shouldn't be there or it needs to be
> before the use otherwise it does nothing. 

ARRAY_SIZE being implemented with sizeof's means that no actual
dereference takes place. But if we have multiple people thinking
this looks buggy then I guess the code probably isn't clear
enough at the moment.

Acked-by: Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>

Thanks,
Charles
--
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