]> git.hungrycats.org Git - linux/commitdiff
intel_pstate: Use del_timer_sync in intel_pstate_cpu_stop
authorDirk Brandewie <dirk.j.brandewie@intel.com>
Mon, 24 Mar 2014 14:41:29 +0000 (07:41 -0700)
committerJiri Slaby <jslaby@suse.cz>
Mon, 11 Apr 2016 14:43:52 +0000 (16:43 +0200)
commit c2294a2f7853e6450361d078b65407bdaa6d1d11 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: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/cpufreq/intel_pstate.c

index 132a9139c19fd2011dbc6e630af344167eea4805..a8056af809997d70f956f960958b7470d093d014 100644 (file)
@@ -635,7 +635,7 @@ static int intel_pstate_cpu_exit(struct cpufreq_policy *policy)
 {
        int cpu = policy->cpu;
 
-       del_timer(&all_cpu_data[cpu]->timer);
+       del_timer_sync(&all_cpu_data[cpu]->timer);
        kfree(all_cpu_data[cpu]);
        all_cpu_data[cpu] = NULL;
        return 0;