Skip to content

Lock warning cleanups

Jules Irenge lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3hrtimer: Add missing annotation to lock_hrtimer_base()kernel/time/hrtimer.c+1 -00 replies
2/3futex: Add missing annotation for wake_futex_pi()kernel/futex.c+1 -00 replies
3/3futex: Add missing annotation for fixup_pi_state_owner()kernel/futex.c+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Lock warning cleanups

This patch series adds missing annotations to functions that register warnings of context imbalance when built with Sparse tool. The adds fix these warnings and give insight on what the functions are actually doing.

1. futex: a __must_hold(q->lock_ptr) is added as fixup_pi_state_owner() hold the lock at entry and exit.

2. futex: a __releases(&pi_state->pi_mutex.wait_lock) is added as wake_futex_pi() releases the lock at exit.

3. hrtimer: an __acquires() annotation is added as lock_hrtimer_base does actually call READ_ONCE(). This add fixes the warning on other functions that call lock_hrtimer_base()

Jules Irenge (3):
hrtimer: Add missing annotation to lock_hrtimer_base()
futex: Add missing annotation for wake_futex_pi()
futex: Add missing annotation for fixup_pi_state_owner()

 kernel/futex.c        | 2 ++
 kernel/time/hrtimer.c | 1 +
 2 files changed, 3 insertions(+)
Signature · 1 line
2.24.1