From: Peter Zijlstra 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.35.5~31 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=51fccd339ff9d32702051b240bf2f8fcdd42749b;p=karo-tx-linux.git x86, tsc: Fix a preemption leak in restore_sched_clock_state() commit 55496c896b8a695140045099d4e0175cf09d4eae upstream. Doh, a real life genuine preemption leak.. This caused a suspend failure. Reported-bisected-and-tested-by-the-invaluable: Jeff Chua Acked-by: Suresh Siddha Signed-off-by: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Nico Schottelius Cc: Jesse Barnes Cc: Linus Torvalds Cc: Florian Pritz Cc: Suresh Siddha Cc: Len Brown sleep states LKML-Reference: <1284150773.402.122.camel@laptop> Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index c65f74152473..4094ae0fac3c 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)