mirror of https://gitee.com/openkylin/linux.git
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: 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>
This commit is contained in:
parent
42b88e6ad4
commit
187226f57f
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue