lkml.org 
[lkml]   [2020]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] futex: Add missing annotation for wake_futex_pi()
Date
Sparse reports a warning at wake_futex_pi()

warning: context imbalance in wake_futex_pi() - unexpected unlock

The root cause is amissing annotation of wake_futex_pi().

Add the missing __releases(&pi_state->pi_mutex.wait_lock) annotation

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

diff --git a/kernel/futex.c b/kernel/futex.c
index 0cf84c8664f2..93e7510a5b36 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1550,6 +1550,7 @@ static void mark_wake_futex(struct wake_q_head *wake_q, struct futex_q *q)
* Caller must hold a reference on @pi_state.
*/
static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_state)
+ __releases(&pi_state->pi_mutex.wait_lock)
{
u32 uninitialized_var(curval), newval;
struct task_struct *new_owner;
--
2.24.1
\
 
 \ /
  Last update: 2020-02-01 01:04    [W:0.057 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site