[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1452533760-13787-12-git-send-email-juri.lelli@arm.com>
Date: Mon, 11 Jan 2016 17:35:52 +0000
From: Juri Lelli <juri.lelli@....com>
To: linux-kernel@...r.kernel.org
Cc: linux-pm@...r.kernel.org, peterz@...radead.org, rjw@...ysocki.net,
viresh.kumar@...aro.org, mturquette@...libre.com,
steve.muckle@...aro.org, vincent.guittot@...aro.org,
morten.rasmussen@....com, dietmar.eggemann@....com,
juri.lelli@....com
Subject: [RFC PATCH 11/19] cpufreq: assert policy->rwsem is held in __cpufreq_governor
__cpufreq_governor works on policy, so policy->rwsem has to be held.
Add assertion for such condition.
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Viresh Kumar <viresh.kumar@...aro.org>
Signed-off-by: Juri Lelli <juri.lelli@....com>
---
drivers/cpufreq/cpufreq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index f1f9fbc..e7fc5c9 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1950,6 +1950,9 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
/* Don't start any governor operations if we are entering suspend */
if (cpufreq_suspended)
return 0;
+
+ lockdep_assert_held(&policy->rwsem);
+
/*
* Governor might not be initiated here if ACPI _PPC changed
* notification happened, so check it.
--
2.2.2
Powered by blists - more mailing lists