public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] intel_pstate:  Use del_timer_sync in intel_pstate_cpu_stop
@ 2014-03-24 14:41 dirk.brandewie
  2014-03-24 14:54 ` Srivatsa S. Bhat
  2014-03-25  4:28 ` Viresh Kumar
  0 siblings, 2 replies; 3+ messages in thread
From: dirk.brandewie @ 2014-03-24 14:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dirk Brandewie, Thomas Gleixner, Rafael J. Wysocki, cpufreq

From: Dirk Brandewie <dirk.j.brandewie@intel.com>

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>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: cpufreq <cpufreq@vger.kernel.org>
---
 drivers/cpufreq/intel_pstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index e9092fd..a4a9ba5 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -780,7 +780,7 @@ static int intel_pstate_cpu_stop(struct cpufreq_policy *policy)
 
 	pr_info("intel_pstate CPU %d exiting\n", cpu_num);
 
-	del_timer(&all_cpu_data[cpu_num]->timer);
+	del_timer_sync(&all_cpu_data[cpu_num]->timer);
 	intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate);
 	kfree(all_cpu_data[cpu_num]);
 	all_cpu_data[cpu_num] = NULL;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-25  4:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-24 14:41 [PATCH] intel_pstate: Use del_timer_sync in intel_pstate_cpu_stop dirk.brandewie
2014-03-24 14:54 ` Srivatsa S. Bhat
2014-03-25  4:28 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox