From: dtor@chromium.org (Dmitry Torokhov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] cpufreq: exynos5440: protect call to dev_pm_opp_get_opp_count with RCU lock
Date: Mon, 15 Dec 2014 17:01:07 -0800 [thread overview]
Message-ID: <20141216010107.GA16947@dtor-ws> (raw)
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
reply other threads:[~2014-12-16 1:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141216010107.GA16947@dtor-ws \
--to=dtor@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox