Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123199
b: refs/heads/master
c: b568636
h: refs/heads/master
i:
  123197: a3b3d35
  123195: 14d8738
  123191: 822cec1
  123183: d4398e1
  123167: 61c7d28
  123135: a9f2548
v: v3
  • Loading branch information
Darren Hart authored and Ingo Molnar committed Dec 19, 2008
1 parent c253fb6 commit 81aec45
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 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: 73500ac545d24610eb2cf8579ffc88957e9c5847
refs/heads/master: b56863630ddbdea6e22df8835f78f0b1da037103
26 changes: 12 additions & 14 deletions trunk/kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1565,12 +1565,11 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared,

uaddr_faulted:
/*
* We have to r/w *(int __user *)uaddr, but we can't modify it
* non-atomically. Therefore, if get_user below is not
* enough, we need to handle the fault ourselves, while
* still holding the mmap_sem.
*
* ... and hb->lock. :-) --ANK
* We have to r/w *(int __user *)uaddr, and we have to modify it
* atomically. Therefore, if we continue to fault after get_user()
* below, we need to handle the fault ourselves, while still holding
* the mmap_sem. This can occur if the uaddr is under contention as
* we have to drop the mmap_sem in order to call get_user().
*/
queue_unlock(&q, hb);

Expand All @@ -1582,7 +1581,7 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared,
}

ret = get_user(uval, uaddr);
if (!ret && (uval != -EFAULT))
if (!ret)
goto retry;

if (to)
Expand Down Expand Up @@ -1676,12 +1675,11 @@ static int futex_unlock_pi(u32 __user *uaddr, int fshared)

pi_faulted:
/*
* We have to r/w *(int __user *)uaddr, but we can't modify it
* non-atomically. Therefore, if get_user below is not
* enough, we need to handle the fault ourselves, while
* still holding the mmap_sem.
*
* ... and hb->lock. --ANK
* We have to r/w *(int __user *)uaddr, and we have to modify it
* atomically. Therefore, if we continue to fault after get_user()
* below, we need to handle the fault ourselves, while still holding
* the mmap_sem. This can occur if the uaddr is under contention as
* we have to drop the mmap_sem in order to call get_user().
*/
spin_unlock(&hb->lock);

Expand All @@ -1694,7 +1692,7 @@ static int futex_unlock_pi(u32 __user *uaddr, int fshared)
}

ret = get_user(uval, uaddr);
if (!ret && (uval != -EFAULT))
if (!ret)
goto retry;

return ret;
Expand Down

0 comments on commit 81aec45

Please sign in to comment.