Skip to content

Commit

Permalink
futex_unlock_pi() hurts my brain and may cause application deadlock
Browse files Browse the repository at this point in the history
Avoid futex_unlock_pi returning -EFAULT (which results in deadlock), by
clearing uval before jumping to retry_locked.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
john stultz authored and Linus Torvalds committed Aug 23, 2007
1 parent 42b88e6 commit 187226f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,7 @@ static int futex_unlock_pi(u32 __user *uaddr, struct rw_semaphore *fshared)
attempt);
if (ret)
goto out;
uval = 0;
goto retry_unlocked;
}

Expand Down

0 comments on commit 187226f

Please sign in to comment.