Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Sebastian Andrzej Siewior and committed by
Thomas Gleixner
38cd4cee 9a7b0158

+2
+2
kernel/time/timer.c
··· 1561 1561 * the waiter to acquire the lock and make progress. 1562 1562 */ 1563 1563 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) 1564 1566 { 1565 1567 if (atomic_read(&base->timer_waiters)) { 1566 1568 raw_spin_unlock_irq(&base->lock);