Skip to content

Commit 38cd4ce

Browse files
Sebastian Andrzej SiewiorKAGA-KOKO
authored andcommitted
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
1 parent 9a7b015 commit 38cd4ce

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

kernel/time/timer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,8 @@ static inline void timer_base_unlock_expiry(struct timer_base *base)
15611561
* the waiter to acquire the lock and make progress.
15621562
*/
15631563
static void timer_sync_wait_running(struct timer_base *base)
1564+
__releases(&base->lock) __releases(&base->expiry_lock)
1565+
__acquires(&base->expiry_lock) __acquires(&base->lock)
15641566
{
15651567
if (atomic_read(&base->timer_waiters)) {
15661568
raw_spin_unlock_irq(&base->lock);

0 commit comments

Comments
 (0)