Re: [pm-wip/voltdm_nm][PATCH 09/10] OMAP2+: PM: secure OPP access using rcu locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 16, 2011 at 15:47, Kevin Hilman <khilman@xxxxxx> wrote:
> Nishanth Menon <nm@xxxxxx> writes:
>
>> OPP functions as described in Documentation/power/opp.txt
>> should be accessed under rcu_locks.
>>
>> Signed-off-by: Nishanth Menon <nm@xxxxxx>
>
> This looks like a fix needed in mainline.
>
> Please send as a standalone patch against mainline and Cc
> linux-arm-kernel.
ok will do.

Regards,
Nishanth Menon

>
> Thanks,
>
> Kevin
>
>> ---
>>  arch/arm/mach-omap2/pm.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
>> index d085f29..7355347 100644
>> --- a/arch/arm/mach-omap2/pm.c
>> +++ b/arch/arm/mach-omap2/pm.c
>> @@ -198,14 +198,17 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
>>       freq = clk->rate;
>>       clk_put(clk);
>>
>> +     rcu_read_lock();
>>       opp = opp_find_freq_ceil(dev, &freq);
>>       if (IS_ERR(opp)) {
>> +             rcu_read_unlock();
>>               printk(KERN_ERR "%s: unable to find boot up OPP for vdd_%s\n",
>>                       __func__, vdd_name);
>>               goto exit;
>>       }
>>
>>       bootup_volt = opp_get_voltage(opp);
>> +     rcu_read_unlock();
>>       if (!bootup_volt) {
>>               printk(KERN_ERR "%s: unable to find voltage corresponding"
>>                       "to the bootup OPP for vdd_%s\n", __func__, vdd_name);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux