* [PATCH] cpufreq: exynos5440: protect call to dev_pm_opp_get_opp_count with RCU lock
@ 2014-12-16 1:01 Dmitry Torokhov
0 siblings, 0 replies; only message in thread
From: Dmitry Torokhov @ 2014-12-16 1:01 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Viresh Kumar, Kukjin Kim, Shawn Guo, Wolfram Sang, Lad, Prabhakar,
Stratos Karafotis, linux-pm, linux-arm-kernel, linux-samsung-soc,
linux-kernel
dev_pm_opp_get_opp_count() must be called with RCU lock held.
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
---
Again, not tested...
drivers/cpufreq/exynos5440-cpufreq.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c
index 21a90ed..588b9ee 100644
--- a/drivers/cpufreq/exynos5440-cpufreq.c
+++ b/drivers/cpufreq/exynos5440-cpufreq.c
@@ -373,7 +373,11 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
"failed to init cpufreq table: %d\n", ret);
goto err_free_opp;
}
+
+ rcu_read_lock();
dvfs_info->freq_count = dev_pm_opp_get_opp_count(dvfs_info->dev);
+ rcu_read_unlock();
+
exynos_sort_descend_freq_table();
if (of_property_read_u32(np, "clock-latency", &dvfs_info->latency))
--
2.2.0.rc0.207.ga3a616c
--
Dmitry
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-16 1:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 1:01 [PATCH] cpufreq: exynos5440: protect call to dev_pm_opp_get_opp_count with RCU lock Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).