Skip to content

Commit

Permalink
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/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
  • Loading branch information
Linus Torvalds committed Nov 2, 2009
2 parents bce8fc4 + 11df6dd commit 3fe866c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@ int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb,
plist_del(&q->list, &q->list.plist);

/* Handle spurious wakeups gracefully */
ret = -EAGAIN;
ret = -EWOULDBLOCK;
if (timeout && !timeout->task)
ret = -ETIMEDOUT;
else if (signal_pending(current))
Expand Down Expand Up @@ -2208,7 +2208,6 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
debug_rt_mutex_init_waiter(&rt_waiter);
rt_waiter.task = NULL;

retry:
key2 = FUTEX_KEY_INIT;
ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_WRITE);
if (unlikely(ret != 0))
Expand Down Expand Up @@ -2303,9 +2302,6 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
out_key2:
put_futex_key(fshared, &key2);

/* Spurious wakeup ? */
if (ret == -EAGAIN)
goto retry;
out:
if (to) {
hrtimer_cancel(&to->timer);
Expand Down

0 comments on commit 3fe866c

Please sign in to comment.