From b2274ddfdf32d3561ebdd9a298c98e29da768b5a Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Mon, 6 Jun 2011 17:54:03 -0500 Subject: [PATCH] OMAP2+: PM: secure OPP access using rcu locks OPP functions as described in Documentation/power/opp.txt should be accessed under rcu_locks. Signed-off-by: Nishanth Menon [vaibhav.bedia@ti.com: Pull in for AM33xx] Signed-off-by: Vaibhav Bedia --- arch/arm/mach-omap2/pm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 2ab7a9e..8315560 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -172,14 +172,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)) { - pr_err("%s: unable to find boot up OPP for vdd_%s\n", + 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) { pr_err("%s: unable to find voltage corresponding " "to the bootup OPP for vdd_%s\n", __func__, vdd_name); -- 1.9.1