Skip to contentSkip to conversation

cpufreq: exynos5440: protect call to dev_pm_opp_get_opp_count with RCU lock

PATCH New Dmitry Torokhov 1 participant 1 message Dec 16, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: exynos5440: protect call to dev_pm_opp_get_opp_count with RCU lock

dev_pm_opp_get_opp_count() must be called with RCU lock held.

---

Again, not tested...

 drivers/cpufreq/exynos5440-cpufreq.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/cpufreq/exynos5440-cpufreq.c +4 -0
index 21a90ed..588b9ee 100644
@@ -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))
Signature · 5 lines
2.2.0.rc0.207.ga3a616c


-- 
Dmitry