Commit 55582bcc authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Rafael J. Wysocki

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: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e2530367
...@@ -1436,8 +1436,10 @@ static void cpufreq_offline_finish(unsigned int cpu) ...@@ -1436,8 +1436,10 @@ static void cpufreq_offline_finish(unsigned int cpu)
* since this is a core component, and is essential for the * since this is a core component, and is essential for the
* subsequent light-weight ->init() to succeed. * subsequent light-weight ->init() to succeed.
*/ */
if (cpufreq_driver->exit) if (cpufreq_driver->exit) {
cpufreq_driver->exit(policy); cpufreq_driver->exit(policy);
policy->freq_table = NULL;
}
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment