summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-07-19 13:59:37 -0400
committerTony Luck <tony.luck@intel.com>2012-08-03 11:45:20 -0700
commitea22571c8fd912f28e2525f7112bbb84b474ff3a (patch)
tree6828731f26c15ed0c862807c65934a9e2c6a127d
parent0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff)
downloadblackbird-op-linux-ea22571c8fd912f28e2525f7112bbb84b474ff3a.tar.gz
blackbird-op-linux-ea22571c8fd912f28e2525f7112bbb84b474ff3a.zip
x86: mce: Disable preemption when calling raise_local()
raise_mce() has a code path which does not disable preemption when the raise_local() is called. The per cpu variable access in raise_local() depends on preemption being disabled to be functional. So that code path was either never tested or never tested with CONFIG_DEBUG_PREEMPT enabled. Add the missing preempt_disable/enable() pair around the call. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce-inject.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
index fc4beb393577..753746f6dbd8 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
@@ -194,7 +194,11 @@ static void raise_mce(struct mce *m)
put_online_cpus();
} else
#endif
+ {
+ preempt_disable();
raise_local();
+ preempt_enable();
+ }
}
/* Error injection interface */
OpenPOWER on IntegriCloud