diff options
author | Jacob Shin <jacob.shin@amd.com> | 2013-06-27 16:02:12 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-27 16:02:12 -0400 |
commit | 419e172145cf6c51d436a8bf4afcd17511f0ff79 (patch) | |
tree | ddf65b39e5096a170f102b9b46e7e11b12cf600c /drivers/cpufreq | |
parent | 874e628f8b34cf4b3b7f471063841647c221f453 (diff) |
cpufreq: don't leave stale policy pointer in cdbs->cur_policy
Clear ->cur_policy when stopping a governor, or the ->cur_policy
pointer may be stale on systems with have_governor_per_policy when a
new policy is allocated due to CPU hotplug offline/online.
[rjw: Changelog]
Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index a849b2d499fa..464587697561 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c | |||
@@ -366,6 +366,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, | |||
366 | 366 | ||
367 | mutex_lock(&dbs_data->mutex); | 367 | mutex_lock(&dbs_data->mutex); |
368 | mutex_destroy(&cpu_cdbs->timer_mutex); | 368 | mutex_destroy(&cpu_cdbs->timer_mutex); |
369 | cpu_cdbs->cur_policy = NULL; | ||
369 | 370 | ||
370 | mutex_unlock(&dbs_data->mutex); | 371 | mutex_unlock(&dbs_data->mutex); |
371 | 372 | ||