]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86: mce: Disable preemption when calling raise_local()
authorThomas Gleixner <tglx@linutronix.de>
Thu, 19 Jul 2012 17:59:37 +0000 (13:59 -0400)
committerTony Luck <tony.luck@intel.com>
Fri, 3 Aug 2012 18:45:20 +0000 (11:45 -0700)
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>
arch/x86/kernel/cpu/mcheck/mce-inject.c

index fc4beb3935771eab1b404b3333cdb7842dac7c5c..753746f6dbd8072f186669d9dd6b43177a19308e 100644 (file)
@@ -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 */