[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200201000416.91900-4-jbi.octave@gmail.com>
Date: Sat, 1 Feb 2020 00:04:16 +0000
From: Jules Irenge <jbi.octave@...il.com>
To: boqun.feng@...il.com
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
dvhart@...radead.org, peterz@...radead.org, mingo@...hat.com,
Jules Irenge <jbi.octave@...il.com>
Subject: [PATCH 3/3] futex: Add missing annotation for fixup_pi_state_owner()
Sparse reports a warning at fixup_pi_state_owner()
warning: context imbalance in fixup_pi_state_owner() - unexpected unlock
The root cause is a missing annotation of fixup_pi_state_owner().
Add the missing __must_hold(q->lock_ptr) annotation
Signed-off-by: Jules Irenge <jbi.octave@...il.com>
---
kernel/futex.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/futex.c b/kernel/futex.c
index 93e7510a5b36..5263cce46c06 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2440,6 +2440,7 @@ static void unqueue_me_pi(struct futex_q *q)
static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
struct task_struct *argowner)
+ __must_hold(q->lock_ptr)
{
struct futex_pi_state *pi_state = q->pi_state;
u32 uval, uninitialized_var(curval), newval;
--
2.24.1
Powered by blists - more mailing lists