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] [day] [month] [year] [list]
Date:	Thu, 30 Aug 2012 11:27:58 -0700
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Rabin Vincent <rabin@....in>
Cc:	Laxman Dewangan <ldewangan@...dia.com>, lrg@...com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] regulator: disable supply regulator if it is enabled
 for boot-on

On Thu, Aug 30, 2012 at 08:24:15PM +0200, Rabin Vincent wrote:

> This does not handle the case where a regulator is not set boot_on but
> is considered on (for example, because of the lack of an is_enabled
> callback), and is later actually enabled by a consumer before
> regulator_init_complete().  In this case, the supply's use count will
> still be one more than it should be, because the "&& c->boot_on"
> condition above will fail.

> To fix this, you should probably note which regulators' supplies you
> enable in regulator_register() and use that information in the above two
> checks here in regulator_init_complete().

Yeah, I didn't read this properly yet but this was my main concern -
this should all just fall out naturally through the normal disable
process.  Doing special case bodges feels really fragile and error
prone.
--
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