[patch] pi-futex: futex_wake() lockup fix
From: Ingo Molnar
Date: Sat Jul 01 2006 - 03:21:50 EST
Subject: pi-futex: futex_wake() lockup fix
From: Ingo Molnar <mingo@xxxxxxx>
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@xxxxxxx>
---
kernel/futex.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: linux/kernel/futex.c
===================================================================
--- linux.orig/kernel/futex.c
+++ linux/kernel/futex.c
@@ -646,8 +646,10 @@ static int futex_wake(u32 __user *uaddr,
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/