Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234308
b: refs/heads/master
c: 6e0aa9f
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Mar 14, 2011
1 parent 15afd15 commit 8367b3f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 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: 995612178c88407d8330f580ba6572cb8b284dd8
refs/heads/master: 6e0aa9f8a8190e0879a29bd67aa606b51734a122
17 changes: 14 additions & 3 deletions trunk/kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -2458,9 +2458,20 @@ int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi)
* userspace.
*/
mval = (uval & FUTEX_WAITERS) | FUTEX_OWNER_DIED;
if (futex_atomic_cmpxchg_inatomic(&nval, uaddr, uval, mval))
return -1;

/*
* We are not holding a lock here, but we want to have
* the pagefault_disable/enable() protection because
* we want to handle the fault gracefully. If the
* access fails we try to fault in the futex with R/W
* verification via get_user_pages. get_user() above
* does not guarantee R/W access. If that fails we
* give up and leave the futex locked.
*/
if (cmpxchg_futex_value_locked(&nval, uaddr, uval, mval)) {
if (fault_in_user_writeable(uaddr))
return -1;
goto retry;
}
if (nval != uval)
goto retry;

Expand Down

0 comments on commit 8367b3f

Please sign in to comment.