diff options
| author | Amit Matityahu <amitmat@amazon.com> | 2026-06-03 17:01:39 +0000 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-06-04 14:35:33 +0200 |
| commit | d486b4934a8e504376b85cdb3766f306d57aff5b (patch) | |
| tree | dee445f75dab52d8676ed16a41f74041463528bd /tools/testing/selftests/livepatch | |
| parent | 3f7fbde4cdd4a25c199a60849897459a63907ca5 (diff) | |
timers/migration: Fix livelock in tmigr_handle_remote_up()
tmigr_handle_remote_cpu() skips timer_expire_remote() when cpu ==
smp_processor_id(), assuming the local softirq path already handled this
CPU's timers.
This assumption is wrong because jiffies can advance after the handling of
the CPU's global timers in run_timer_base(BASE_GLOBAL) and before
tmigr_handle_remote() evaluates the expiry times.
As a consequence a timer which expires after the CPU local timer wheel
advanced and becomes expired in the remote handling is ignored and the
callback is never invoked and removed from the timer wheel.
What's worse is that fetch_next_timer_interrupt_remote() keeps reporting it
as expired, and the event is re-queued with expires == now on each
iteration. The goto-again loop spins indefinitely.
Fix this by calling timer_expire_remote() unconditionally. That's minimal
overhead for the common case as __run_timer_base() returns immediately if
there is nothing to expire in the local wheel.
[ tglx: Amend change log and add a comment ]
Fixes: 7ee988770326 ("timers: Implement the hierarchical pull model")
Reported-by: Alon Kariv <alonka@amazon.com>
Signed-off-by: Amit Matityahu <amitmat@amazon.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260603170139.33628-1-amitmat@amazon.com
Diffstat (limited to 'tools/testing/selftests/livepatch')
0 files changed, 0 insertions, 0 deletions
