linux/arch/x86/kernel/cpu/mcheck
Ingo Molnar ea431643d6 x86/mce: Fix CMCI preemption bugs
The following commit:

  27f6c573e0 ("x86, CMCI: Add proper detection of end of CMCI storms")

Added two preemption bugs:

 - machine_check_poll() does a get_cpu_var() without a matching
   put_cpu_var(), which causes preemption imbalance and crashes upon
   bootup.

 - it does percpu ops without disabling preemption. Preemption is not
   disabled due to the mistaken use of a raw spinlock.

To fix these bugs fix the imbalance and change
cmci_discover_lock to a regular spinlock.

Reported-by: Owen Kibel <qmewlo@gmail.com>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Chen, Gong <gong.chen@linux.intel.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alexander Todorov <atodorov@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Link: http://lkml.kernel.org/n/tip-jtjptvgigpfkpvtQxpEk1at2@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
--
 arch/x86/kernel/cpu/mcheck/mce.c       |    4 +---
 arch/x86/kernel/cpu/mcheck/mce_intel.c |   18 +++++++++---------
 2 files changed, 10 insertions(+), 12 deletions(-)
2014-04-17 10:28:42 +02:00
..
Makefile ACPI, APEI, Generic Hardware Error Source memory error support 2010-05-19 22:41:16 -04:00
mce_amd.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
mce_intel.c x86/mce: Fix CMCI preemption bugs 2014-04-17 10:28:42 +02:00
mce-apei.c ACPI, APEI, GHES: Do not report only correctable errors with SCI 2013-12-21 13:31:06 +01:00
mce-inject.c x86, mce: Fix "braodcast" typo 2013-06-05 11:59:17 +02:00
mce-internal.h mce: acpi/apei: Honour Firmware First for MCA banks listed in APEI HEST CMC 2013-07-08 11:53:01 -07:00
mce-severity.c x86/mce: Fix mce regression from recent cleanup 2013-07-29 11:23:27 -07:00
mce.c x86/mce: Fix CMCI preemption bugs 2014-04-17 10:28:42 +02:00
p5.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
therm_throt.c x86, therm_throt.c: Remove unused therm_cpu_lock 2014-03-20 13:43:43 +01:00
threshold.c x86, trace: Add irq vector tracepoints 2013-06-20 22:25:34 -07:00
winchip.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00