timers: Replace BUG_ON()s
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Nov 2022 20:18:39 +0000 (21:18 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 24 Nov 2022 14:09:11 +0000 (15:09 +0100)
commit82ed6f7ef58f9634fe4462dd721902c580f01569
tree48f223c6b96de5add00396cd5ed0ce9d5e2b522f
parent9a5a305686971f4be10c6d7251c8348d74b3e014
timers: Replace BUG_ON()s

The timer code still has a few BUG_ON()s left which are crashing the kernel
in situations where it still can recover or simply refuse to take an
action.

Remove the one in the hotplug callback which checks for the CPU being
offline. If that happens then the whole hotplug machinery will explode in
colourful ways.

Replace the rest with WARN_ON_ONCE() and conditional returns where
appropriate.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Link: https://lore.kernel.org/r/20221123201624.769128888@linutronix.de
kernel/time/timer.c