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>] [day] [month] [year] [list]
Date:	Mon, 15 Dec 2014 17:01:07 -0800
From:	Dmitry Torokhov <dtor@...omium.org>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Viresh Kumar <viresh.kumar@...aro.org>,
	Kukjin Kim <kgene@...nel.org>,
	Shawn Guo <shawn.guo@...aro.org>,
	Wolfram Sang <wsa@...-dreams.de>,
	"Lad, Prabhakar" <prabhakar.csengg@...il.com>,
	Stratos Karafotis <stratosk@...aphore.gr>,
	linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] 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.

Signed-off-by: Dmitry Torokhov <dtor@...omium.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ