linux/arch/x86/kernel/cpu/mcheck
Thomas Gleixner 0becc0ae5b x86/mce: Make timer handling more robust
Erik reported that on a preproduction hardware a CMCI storm triggers the
BUG_ON in add_timer_on(). The reason is that the per CPU MCE timer is
started by the CMCI logic before the MCE CPU hotplug callback starts the
timer with add_timer_on(). So the timer is already queued which triggers
the BUG.

Using add_timer_on() is pretty pointless in this code because the timer is
strictlty per CPU, initialized as pinned and all operations which arm the
timer happen on the CPU to which the timer belongs.

Simplify the whole machinery by using mod_timer() instead of add_timer_on()
which avoids the problem because mod_timer() can handle already queued
timers. Use __start_timer() everywhere so the earliest armed expiry time is
preserved.

Reported-by: Erik Veijola <erik.veijola@intel.com>
Tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@alien8.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701310936080.3457@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2017-01-31 21:47:58 +01:00
..
Makefile x86/mce: Provide a lockless memory pool to save error records 2015-08-13 10:12:50 +02:00
mce-apei.c x86/mce: Do not use bank 1 for APEI generated error logs 2016-06-14 10:51:14 +02:00
mce-genpool.c x86/mce: Look in genpool instead of mcelog for pending error records 2016-05-03 08:24:16 +02:00
mce-inject.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00
mce-internal.h x86/mce: Look in genpool instead of mcelog for pending error records 2016-05-03 08:24:16 +02:00
mce-severity.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mce.c x86/mce: Make timer handling more robust 2017-01-31 21:47:58 +01:00
mce_amd.c x86/mce/AMD: Make the init code more robust 2016-12-26 17:30:24 -08:00
mce_intel.c x86/mce: Include the PPIN in MCE records when available 2016-11-23 16:51:52 +01:00
p5.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00
therm_throt.c Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 19:25:04 -08:00
threshold.c x86: Remove empty idle.h header 2016-12-09 21:23:22 +01:00
winchip.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00