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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 9a7b015 commit 38cd4ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)