提交 ed6f7b10 编写于 作者: I Ingo Molnar 提交者: Linus Torvalds

[PATCH] pi-futex: futex_wake() lockup fix

Fix futex_wake() exit condition bug when handling the robust-list with PI
futexes on them.

(reported by Ulrich Drepper, debugged by the lock validator.)
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 a99e4e41
......@@ -630,8 +630,10 @@ static int futex_wake(u32 __user *uaddr, int nr_wake)
list_for_each_entry_safe(this, next, head, list) {
if (match_futex (&this->key, &key)) {
if (this->pi_state)
return -EINVAL;
if (this->pi_state) {
ret = -EINVAL;
break;
}
wake_futex(this);
if (++ret >= nr_wake)
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册