[PATCH 11/11] futex: Add missing annotation for futex_wait_queue_me()

From: Jules Irenge
Date: Sun Feb 09 2020 - 17:50:58 EST


Sparse reports a warning at futex_wait_queue_me()

warning: context imbalance in futex_wait_queue_me() - unexpected unlock

The root cause is a missing annotation at futex_wait_queue_me()

Add the missing annotation __releases(&hb->lock)

Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
kernel/futex.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/futex.c b/kernel/futex.c
index 5263cce46c06..16c6c40dbd68 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2679,6 +2679,7 @@ static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked)
*/
static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q,
struct hrtimer_sleeper *timeout)
+ __releases(&hb->lock)
{
/*
* The task state is guaranteed to be set before another task can
--
2.24.1