Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175472
b: refs/heads/master
c: 722d017
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Thomas Gleixner committed Dec 8, 2009
1 parent 1afcc63 commit 8e25032
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: f5754bfd107b08edddaf871d676ec6fe0792d07a
refs/heads/master: 722d0172377a5697919b9f7e5beb95165b1dec4e
10 changes: 8 additions & 2 deletions trunk/kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,14 @@ void put_futex_key(int fshared, union futex_key *key)
*/
static int fault_in_user_writeable(u32 __user *uaddr)
{
int ret = get_user_pages(current, current->mm, (unsigned long)uaddr,
1, 1, 0, NULL, NULL);
struct mm_struct *mm = current->mm;
int ret;

down_read(&mm->mmap_sem);
ret = get_user_pages(current, mm, (unsigned long)uaddr,
1, 1, 0, NULL, NULL);
up_read(&mm->mmap_sem);

return ret < 0 ? ret : 0;
}

Expand Down

0 comments on commit 8e25032

Please sign in to comment.