[PATCH 0/3] Lock warning cleanups

From: Jules Irenge
Date: Fri Jan 31 2020 - 19:04:53 EST


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(+)

--
2.24.1