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]
Message-ID: <20120423110912.GC8318@opensource.wolfsonmicro.com>
Date:	Mon, 23 Apr 2012 12:09:13 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	Shreshtha Kumar Sahu <shreshthakumar.sahu@...ricsson.com>,
	"Milo(Woogyom) Kim" <milo.kim@...com>,
	Richard Purdie <rpurdie@...ys.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Liam Girdwood <lrg@...com>
Subject: Re: [PATCH] leds: lm3530: fix handling of already enabled regulators

On Sun, Apr 22, 2012 at 11:11:48PM +0800, Axel Lin wrote:

>  		drvdata->regulator = NULL;
>  		goto err_regulator_get;
>  	}
> +	drvdata->enable = regulator_is_enabled(drvdata->regulator);
>  

This isn't sufficient for what the driver is doing - it also needs to
enable the regulator.  Regulator enables are reference counted (since
the regulator can be shared by many device supplies) so if this driver
doesn't reference the regulator when it's needed then it could get
powered off.

If this regulator is the actual LED then the current default of assuming
the regulator is off on boot isn't ideal either as it means that if the
regulator is enabled on boot then the LED may be left on even though the
driver thinks it's off.

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ