hrtimer: Report offline hrtimer enqueue
authorFrederic Weisbecker <frederic@kernel.org>
Mon, 29 Jan 2024 23:56:36 +0000 (15:56 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 6 Feb 2024 09:56:35 +0000 (10:56 +0100)
commitdad6a09f3148257ac1773cd90934d721d68ab595
tree98f82d7b233d26ee5f7e9cfb790fb53c71abee42
parent54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478
hrtimer: Report offline hrtimer enqueue

The hrtimers migration on CPU-down hotplug process has been moved
earlier, before the CPU actually goes to die. This leaves a small window
of opportunity to queue an hrtimer in a blind spot, leaving it ignored.

For example a practical case has been reported with RCU waking up a
SCHED_FIFO task right before the CPUHP_AP_IDLE_DEAD stage, queuing that
way a sched/rt timer to the local offline CPU.

Make sure such situations never go unnoticed and warn when that happens.

Fixes: 5c0930ccaad5 ("hrtimers: Push pending hrtimers away from outgoing CPU earlier")
Reported-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240129235646.3171983-4-boqun.feng@gmail.com
include/linux/hrtimer.h
kernel/time/hrtimer.c