diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2024-08-12 12:51:04 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-08-14 12:44:41 +0200 |
commit | 38cd4cee73a87c40a3e9ef31c0ca7b179fd282f0 (patch) | |
tree | 50126b4a0a757b953f7a3571b2208885870d10cc | |
parent | 9a7b0158aea7a53c8c942e8b83e16f7f30e0018c (diff) |
timers: Add sparse annotation for timer_sync_wait_running().
timer_sync_wait_running() first releases two locks and then acquires
them again. This is unexpected and sparse complains about it.
Add sparse annotation for timer_sync_wait_running() to note that the
locking is expected.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240812105326.2240000-2-bigeasy@linutronix.de
-rw-r--r-- | kernel/time/timer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 64b0d8a0aa0f..429232d8659a 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1561,6 +1561,8 @@ static inline void timer_base_unlock_expiry(struct timer_base *base) * the waiter to acquire the lock and make progress. */ static void timer_sync_wait_running(struct timer_base *base) + __releases(&base->lock) __releases(&base->expiry_lock) + __acquires(&base->expiry_lock) __acquires(&base->lock) { if (atomic_read(&base->timer_waiters)) { raw_spin_unlock_irq(&base->lock); |