summaryrefslogtreecommitdiffstats
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-11-10 04:10:31 +0100
committerIngo Molnar <mingo@elte.hu>2009-11-10 04:10:35 +0100
commit7e1a2766e67a529f62c8cfba0a47d63fc4f7fa8a (patch)
tree197950369a773afdf04af9bdfc4a2ce1d2b5d3af /kernel/futex.c
parentc5e0cb3ddc5f14cedcfc50c0fb3b5fc6b56576da (diff)
parent83f5b01ffbbaea6f97c9a79d21e240dbfb69f2f1 (diff)
downloadkernel-crypto-7e1a2766e67a529f62c8cfba0a47d63fc4f7fa8a.tar.gz
kernel-crypto-7e1a2766e67a529f62c8cfba0a47d63fc4f7fa8a.tar.xz
kernel-crypto-7e1a2766e67a529f62c8cfba0a47d63fc4f7fa8a.zip
Merge branch 'core/urgent' into core/rcu
Merge reason: Pick up RCU fixlet to base further commits on. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index 06938e560ac..fb65e822fc4 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1029,7 +1029,6 @@ static inline
void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key,
struct futex_hash_bucket *hb)
{
- drop_futex_key_refs(&q->key);
get_futex_key_refs(key);
q->key = *key;
@@ -1227,6 +1226,7 @@ retry_private:
*/
if (ret == 1) {
WARN_ON(pi_state);
+ drop_count++;
task_count++;
ret = get_futex_value_locked(&curval2, uaddr2);
if (!ret)
@@ -1305,6 +1305,7 @@ retry_private:
if (ret == 1) {
/* We got the lock. */
requeue_pi_wake_futex(this, &key2, hb2);
+ drop_count++;
continue;
} else if (ret) {
/* -EDEADLK */
@@ -2126,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))
@@ -2207,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))
@@ -2302,9 +2302,6 @@ out_put_keys:
out_key2:
put_futex_key(fshared, &key2);
- /* Spurious wakeup ? */
- if (ret == -EAGAIN)
- goto retry;
out:
if (to) {
hrtimer_cancel(&to->timer);