aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-11-02 12:46:33 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-11-02 12:46:33 -0500
commit3fe866ca6cc0495510a1d37c03a4abdc55174e83 (patch)
tree4b3d4ae603b01e2f9179d29402d5946ff50eb28f /kernel
parentbce8fc4cb796dc77ea71699ef88802879a177474 (diff)
parent11df6dddcbc38affb7473aad3d962baf8414a947 (diff)
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: futex: Fix spurious wakeup for requeue_pi really
Diffstat (limited to 'kernel')
-rw-r--r--kernel/futex.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index 642f3bbaacc7..fb65e822fc41 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2127,7 +2127,7 @@ int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb,
2127 plist_del(&q->list, &q->list.plist); 2127 plist_del(&q->list, &q->list.plist);
2128 2128
2129 /* Handle spurious wakeups gracefully */ 2129 /* Handle spurious wakeups gracefully */
2130 ret = -EAGAIN; 2130 ret = -EWOULDBLOCK;
2131 if (timeout && !timeout->task) 2131 if (timeout && !timeout->task)
2132 ret = -ETIMEDOUT; 2132 ret = -ETIMEDOUT;
2133 else if (signal_pending(current)) 2133 else if (signal_pending(current))
@@ -2208,7 +2208,6 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
2208 debug_rt_mutex_init_waiter(&rt_waiter); 2208 debug_rt_mutex_init_waiter(&rt_waiter);
2209 rt_waiter.task = NULL; 2209 rt_waiter.task = NULL;
2210 2210
2211retry:
2212 key2 = FUTEX_KEY_INIT; 2211 key2 = FUTEX_KEY_INIT;
2213 ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_WRITE); 2212 ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_WRITE);
2214 if (unlikely(ret != 0)) 2213 if (unlikely(ret != 0))
@@ -2303,9 +2302,6 @@ out_put_keys:
2303out_key2: 2302out_key2:
2304 put_futex_key(fshared, &key2); 2303 put_futex_key(fshared, &key2);
2305 2304
2306 /* Spurious wakeup ? */
2307 if (ret == -EAGAIN)
2308 goto retry;
2309out: 2305out:
2310 if (to) { 2306 if (to) {
2311 hrtimer_cancel(&to->timer); 2307 hrtimer_cancel(&to->timer);