diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2023-06-01 22:16:34 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2023-06-18 22:40:42 +0200 |
commit | 9d9e522010eb5685d8b53e8a24320653d9d4cbbf (patch) | |
tree | 46167f5414553b9e15b75c94bb78c109f48c68f8 /kernel/time/tick-broadcast-hrtimer.c | |
parent | b7a7ce1bb77b19ff2859d365da96285340fbc145 (diff) |
posix-timers: Prevent RT livelock in itimer_delete()
itimer_delete() has a retry loop when the timer is concurrently expired. On
non-RT kernels this just spin-waits until the timer callback has completed,
except for posix CPU timers which have HAVE_POSIX_CPU_TIMERS_TASK_WORK
enabled.
In that case and on RT kernels the existing task could live lock when
preempting the task which does the timer delivery.
Replace spin_unlock() with an invocation of timer_wait_running() to handle
it the same way as the other retry loops in the posix timer code.
Fixes: ec8f954a40da ("posix-timers: Use a callback for cancel synchronization on PREEMPT_RT")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/87v8g7c50d.ffs@tglx
Diffstat (limited to 'kernel/time/tick-broadcast-hrtimer.c')
0 files changed, 0 insertions, 0 deletions