x86, MCE: Robustify mcheck_init_device
authorBorislav Petkov <bp@suse.de>
Fri, 20 Jun 2014 21:16:45 +0000 (23:16 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 21 Jul 2014 16:14:32 +0000 (18:14 +0200)
commit51cbe7e7c400def749950ab6b2c120624dbe21a7
tree4dad4c11bc99e9596fa5e6c6d0bb426388ec957d
parent9a3c4145af32125c5ee39c0272662b47307a8323
x86, MCE: Robustify mcheck_init_device

BorisO reports that misc_register() fails often on xen. The current code
unregisters the CPU hotplug notifier in that case. If then a CPU is
offlined and onlined back again, we end up with a second timer running
on that CPU, leading to soft lockups and system hangs.

So let's leave the hotcpu notifier always registered - even if
mce_device_create failed for some cores and never unreg it so that we
can deal with the timer handling accordingly.

Reported-and-Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: http://lkml.kernel.org/r/1403274493-1371-1-git-send-email-boris.ostrovsky@oracle.com
Signed-off-by: Borislav Petkov <bp@suse.de>
arch/x86/kernel/cpu/mcheck/mce.c