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, 13 Dec 2012 05:06:28 +0000 (UTC)
From:	Paul Walmsley <paul@...an.com>
To:	Paolo Pisati <paolo.pisati@...onical.com>
cc:	linux-omap <linux-omap@...r.kernel.org>,
	Liam Girdwood <lrg@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: core: if voltage scaling fails, restore
 original

On Wed, 12 Dec 2012, Paolo Pisati wrote:

> but inside regulator_set_voltage(), we save the new regulator voltage before
> actually ramping up:
> 
> core.c::regulator_set_voltage():
> 	...
>     regulator->min_uV = min_uV;
>     regulator->max_uV = max_uV;
> 
>     ret = regulator_check_consumers(rdev, &min_uV, &max_uV);
>     if (ret < 0)
>         goto out2;
> 
>     ret = _regulator_do_set_voltage(rdev, min_uV, max_uV);  <-- ERROR!!!
>     if (ret < 0)
>         goto out2;
> 	...

I'm not too familiar with this code.  But isn't this where the bug is, 
rather than in that optimization commit you mentioned?  Seems to me, 
naïvely, that in the above code, regulator->min_uV and regulator->max_uV 
should be set only after _regulator_do_set_voltage() succeeds?


- Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ