30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
From: Peter Zijlstra <peterz@infradead.org>
|
|
Date: Fri, 10 Sep 2010 20:32:53 +0000 (+0200)
|
|
Subject: x86, tsc: Fix a preemption leak in restore_sched_clock_state()
|
|
X-Git-Tag: v2.6.36-rc4~11
|
|
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=5ee5e97ee9bca919af11c562beeaf61741ad33f1
|
|
|
|
x86, tsc: Fix a preemption leak in restore_sched_clock_state()
|
|
|
|
A real life genuine preemption leak..
|
|
|
|
Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
|
|
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
|
|
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
|
|
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
---
|
|
|
|
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
|
|
index d632934..26a863a 100644
|
|
--- a/arch/x86/kernel/tsc.c
|
|
+++ b/arch/x86/kernel/tsc.c
|
|
@@ -655,7 +655,7 @@ void restore_sched_clock_state(void)
|
|
|
|
local_irq_save(flags);
|
|
|
|
- get_cpu_var(cyc2ns_offset) = 0;
|
|
+ __get_cpu_var(cyc2ns_offset) = 0;
|
|
offset = cyc2ns_suspend - sched_clock();
|
|
|
|
for_each_possible_cpu(cpu)
|