提交 187226f5 编写于 作者: J john stultz 提交者: Linus Torvalds

futex_unlock_pi() hurts my brain and may cause application deadlock

Avoid futex_unlock_pi returning -EFAULT (which results in deadlock), by
clearing uval before jumping to retry_locked.
Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
Acked-by: NSteven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 42b88e6a
...@@ -1670,6 +1670,7 @@ static int futex_unlock_pi(u32 __user *uaddr, struct rw_semaphore *fshared) ...@@ -1670,6 +1670,7 @@ static int futex_unlock_pi(u32 __user *uaddr, struct rw_semaphore *fshared)
attempt); attempt);
if (ret) if (ret)
goto out; goto out;
uval = 0;
goto retry_unlocked; goto retry_unlocked;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册