From: Dmitry Torokhov <dtor@chromium.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
Kukjin Kim <kgene@kernel.org>, Shawn Guo <shawn.guo@linaro.org>,
Wolfram Sang <wsa@the-dreams.de>,
"Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
Stratos Karafotis <stratosk@semaphore.gr>,
linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.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
WARNING: multiple messages have this Message-ID (diff)
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
next reply other threads:[~2014-12-16 1:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 1:01 Dmitry Torokhov [this message]
2014-12-16 1:01 ` [PATCH] cpufreq: exynos5440: protect call to dev_pm_opp_get_opp_count with RCU lock Dmitry Torokhov
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=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
--cc=rjw@rjwysocki.net \
--cc=shawn.guo@linaro.org \
--cc=stratosk@semaphore.gr \
--cc=viresh.kumar@linaro.org \
--cc=wsa@the-dreams.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.