Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137595
b: refs/heads/master
c: de87fcc
h: refs/heads/master
i:
  137593: 276e1c1
  137591: fb894b1
v: v3
  • Loading branch information
Darren Hart authored and Ingo Molnar committed Mar 12, 2009
1 parent f0a8b55 commit 0269012
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b2d0994b1301fc3a6a89e1889578dac9227840e3
refs/heads/master: de87fcc124a5d4a171aa32707b3265608ebda6e7
16 changes: 11 additions & 5 deletions trunk/kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,10 @@ futex_wake_op(u32 __user *uaddr1, int fshared, u32 __user *uaddr2,

ret = get_user(dummy, uaddr2);
if (ret)
return ret;
goto out_put_keys;

put_futex_key(fshared, &key2);
put_futex_key(fshared, &key1);
goto retryfull;
}

Expand Down Expand Up @@ -878,6 +880,9 @@ static int futex_requeue(u32 __user *uaddr1, int fshared, u32 __user *uaddr2,
if (hb1 != hb2)
spin_unlock(&hb2->lock);

put_futex_key(fshared, &key2);
put_futex_key(fshared, &key1);

ret = get_user(curval, uaddr1);

if (!ret)
Expand Down Expand Up @@ -1453,6 +1458,7 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared,
* exit to complete.
*/
queue_unlock(&q, hb);
put_futex_key(fshared, &q.key);
cond_resched();
goto retry;

Expand Down Expand Up @@ -1595,13 +1601,12 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared,

ret = get_user(uval, uaddr);
if (!ret)
goto retry;
goto retry_unlocked;

if (to)
destroy_hrtimer_on_stack(&to->timer);
return ret;
goto out_put_key;
}


/*
* Userspace attempted a TID -> 0 atomic transition, and failed.
* This is the in-kernel slowpath: we look up the PI state (if any),
Expand Down Expand Up @@ -1705,6 +1710,7 @@ static int futex_unlock_pi(u32 __user *uaddr, int fshared)
}

ret = get_user(uval, uaddr);
put_futex_key(fshared, &key);
if (!ret)
goto retry;

Expand Down

0 comments on commit 0269012

Please sign in to comment.