https://github.com/torvalds/linux
Revision 26456f87aca7157c057de65c9414b37f1ab881d1 authored by Thomas Gleixner on 27 December 2017, 20:37:25 UTC, committed by Thomas Gleixner on 29 December 2017, 22:13:09 UTC
The timer wheel bases are not (re)initialized on CPU hotplug. That leaves
them with a potentially stale clk and next_expiry valuem, which can cause
trouble then the CPU is plugged.

Add a prepare callback which forwards the clock, sets next_expiry to far in
the future and reset the control flags to a known state.

Set base->must_forward_clk so the first timer which is queued will try to
forward the clock to current jiffies.

Fixes: 500462a9de65 ("timers: Switch to a non-cascading wheel")
Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1712272152200.2431@nanos

1 parent ced6d5c
History
Tip revision: 26456f87aca7157c057de65c9414b37f1ab881d1 authored by Thomas Gleixner on 27 December 2017, 20:37:25 UTC
timers: Reinitialize per cpu bases on hotplug
Tip revision: 26456f8

back to top