summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2015-10-07 13:50:44 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-08 21:47:56 +0200
commit55582bccdc1e89ecc973c260d46e247df675d4df (patch)
treeb176a4ab379606a9fb13165c24596be55e035d3b /drivers/cpufreq
parente25303676e18a7947185a34e26dd08cf0c0ea573 (diff)
downloadop-kernel-dev-55582bccdc1e89ecc973c260d46e247df675d4df.zip
op-kernel-dev-55582bccdc1e89ecc973c260d46e247df675d4df.tar.gz
cpufreq: prevent lockup on reading scaling_available_frequencies
When scaling_available_frequencies is read on an offlined cpu, then either lockup or junk values are displayed. This is caused by freed freq_table, which policy is using. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index ef5ed94..25c4c15 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1436,8 +1436,10 @@ static void cpufreq_offline_finish(unsigned int cpu)
* since this is a core component, and is essential for the
* subsequent light-weight ->init() to succeed.
*/
- if (cpufreq_driver->exit)
+ if (cpufreq_driver->exit) {
cpufreq_driver->exit(policy);
+ policy->freq_table = NULL;
+ }
}
/**
OpenPOWER on IntegriCloud