alistair23-linux/arch/x86/kernel/cpu/mcheck
Hidetoshi Seto e5299926d7 x86: MCE: make cmci_discover_lock irq-safe
Lockdep reports the warning below when Li tries to offline one cpu:

[  110.835487] =================================
[  110.835616] [ INFO: inconsistent lock state ]
[  110.835688] 2.6.30-rc4-00336-g8c9ed89 #52
[  110.835757] ---------------------------------
[  110.835828] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
[  110.835908] swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
[  110.835982]  (cmci_discover_lock){?.+...}, at: [<ffffffff80236dc0>] cmci_clear+0x30/0x9b

cmci_clear() can be called via smp_call_function_single().

It is better to disable interrupt while holding cmci_discover_lock,
to turn it into an irq-safe lock - we can deadlock otherwise.

[ Impact: fix possible deadlock in the MCE code ]

Reported-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <4A03ED38.8000700@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Reported-by: Shaohua Li<shaohua.li@intel.com>
2009-05-08 11:03:26 +02:00
..
k7.c Update email addresses. 2008-10-20 12:50:03 -07:00
Makefile x86, mce, cmci: factor out threshold interrupt handler 2009-02-24 13:24:42 -08:00
mce.h x86: remove all definitions with fastcall 2008-01-30 13:31:17 +01:00
mce_32.c x86, mce: don't disable machine checks during code patching 2009-02-17 15:32:38 -08:00
mce_64.c x86, mce: fix boot logging logic 2009-04-22 13:56:25 -07:00
mce_amd_64.c Merge branch 'linus' into cpumask-for-linus 2009-03-30 23:53:32 +02:00
mce_intel_64.c x86: MCE: make cmci_discover_lock irq-safe 2009-05-08 11:03:26 +02:00
non-fatal.c Update email addresses. 2008-10-20 12:50:03 -07:00
p4.c x86: use symbolic constants for MSR_IA32_MISC_ENABLE bits 2009-02-20 12:07:43 +01:00
p5.c x86: update Alan Cox's email addresses 2009-01-05 15:19:16 +01:00
p6.c x86: update Alan Cox's email addresses 2009-01-05 15:19:16 +01:00
therm_throt.c sysdev: Pass the attribute to the low level sysdev show/store function 2008-07-21 21:55:02 -07:00
threshold.c x86, mce: fix build failure in arch/x86/kernel/cpu/mcheck/threshold.c 2009-03-04 11:48:28 +01:00
winchip.c x86: update Alan Cox's email addresses 2009-01-05 15:19:16 +01:00