Commit b8c77bd5 authored by Dirk Brandewie's avatar Dirk Brandewie Committed by Jiri Slaby

intel_pstate: Use del_timer_sync in intel_pstate_cpu_stop

commit c2294a2f upstream.

Ensure that no timer callback is running since we are about to free
the timer structure.  We cannot guarantee that the call back is called
on the CPU where the timer is running.
Reported-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarDirk Brandewie <dirk.j.brandewie@intel.com>
Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent a706ac40
...@@ -635,7 +635,7 @@ static int intel_pstate_cpu_exit(struct cpufreq_policy *policy) ...@@ -635,7 +635,7 @@ static int intel_pstate_cpu_exit(struct cpufreq_policy *policy)
{ {
int cpu = policy->cpu; int cpu = policy->cpu;
del_timer(&all_cpu_data[cpu]->timer); del_timer_sync(&all_cpu_data[cpu]->timer);
kfree(all_cpu_data[cpu]); kfree(all_cpu_data[cpu]);
all_cpu_data[cpu] = NULL; all_cpu_data[cpu] = NULL;
return 0; return 0;
......
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