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, 21 Apr 2016 16:34:39 +0100
From:	Jon Hunter <jonathanh@...dia.com>
To:	Mark Brown <broonie@...nel.org>
CC:	Thierry Reding <thierry.reding@...il.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/5] regulator: core: Resolve supply earlier


On 20/04/16 16:21, Mark Brown wrote:
> * PGP Signed by an unknown key
> 
> On Tue, Apr 19, 2016 at 05:09:59PM +0100, Jon Hunter wrote:
>> On 19/04/16 16:40, Mark Brown wrote:
> 
>>> This is *really* weird.  Why would we need the list lock to do a
>>> device_register()?  
> 
>> So I did not think that we would want someone to be able to 
>> look-up the regulator via of_find_regulator_by_node() until
>> it had been registered successfully. In fact I believe that
>> not locking around device_register() was causing some crashes
>> when I was testing.
> 
> What that's saying to me is that the device_register() is too early and
> we shouldn't be registering the device until we're ready for it to be
> used.

True and in fact looking at the code some more I am not sure that the
mutex actually would prevent someone from getting the regulator before
it is completely setup. I have moved this to the end of the registration
and seems to be fine. I will send out some patches for review.

Cheers
Jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ