aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-07-01 07:35:46 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-01 12:55:57 -0400
commited6f7b10e657b98b4ba89385d02852c8bdf3980e (patch)
treea53bfca204307322400c3fff1e75563233d38dfc /kernel
parenta99e4e413e1ab9f3c567b5519f5557afd786dc62 (diff)
[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: Ingo Molnar <mingo@elte.hu> Cc: Ulrich Drepper <drepper@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/futex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index 22aa3c16ca73..15caf93e4a43 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -630,8 +630,10 @@ static int futex_wake(u32 __user *uaddr, int nr_wake)
630 630
631 list_for_each_entry_safe(this, next, head, list) { 631 list_for_each_entry_safe(this, next, head, list) {
632 if (match_futex (&this->key, &key)) { 632 if (match_futex (&this->key, &key)) {
633 if (this->pi_state) 633 if (this->pi_state) {
634 return -EINVAL; 634 ret = -EINVAL;
635 break;
636 }
635 wake_futex(this); 637 wake_futex(this);
636 if (++ret >= nr_wake) 638 if (++ret >= nr_wake)
637 break; 639 break;