aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2010-12-06 16:31:53 -0800
committerDima Zavin <dima@android.com>2010-12-08 16:27:01 -0800
commit415c4295773a5e0f365cc2e9dcbf3ef3c378cc95 (patch)
tree005878449d62dd834d925674632810604d2c5dd3
parent0c31cbc70fd01eea50b4cf17acad48bfd0a0410f (diff)
downloadqemu-415c4295773a5e0f365cc2e9dcbf3ef3c378cc95.tar.gz
Revert "futex: Restore one of the fast paths eliminated by 38d47c1b7075bd7ec3881141bb3629da58f88dab"
This reverts commit cb93471ed5d924b6efdfe5d0215668a9b4b91c21. Change-Id: I7f0b45c29b3b91ba5282c51eb6b315d70ac6c813 Signed-off-by: Dima Zavin <dima@android.com>
-rw-r--r--kernel/futex.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index 257db2460ab..6a3a5fa1526 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -220,7 +220,6 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key)
struct mm_struct *mm = current->mm;
struct page *page;
int err;
- struct vm_area_struct *vma;
/*
* The futex address must be "naturally" aligned.
@@ -246,37 +245,6 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key)
return 0;
}
- /*
- * The futex is hashed differently depending on whether
- * it's in a shared or private mapping. So check vma first.
- */
- vma = find_extend_vma(mm, address);
- if (unlikely(!vma))
- return -EFAULT;
-
- /*
- * Permissions.
- */
- if (unlikely((vma->vm_flags & (VM_IO|VM_READ)) != VM_READ))
- return (vma->vm_flags & VM_IO) ? -EPERM : -EACCES;
-
- /*
- * Private mappings are handled in a simple way.
- *
- * NOTE: When userspace waits on a MAP_SHARED mapping, even if
- * it's a read-only handle, it's expected that futexes attach to
- * the object not the particular process. Therefore we use
- * VM_MAYSHARE here, not VM_SHARED which is restricted to shared
- * mappings of _writable_ handles.
- */
- if (likely(!(vma->vm_flags & VM_MAYSHARE))) {
- key->both.offset |= FUT_OFF_MMSHARED; /* reference taken on mm */
- key->private.mm = mm;
- key->private.address = address;
- get_futex_key_refs(key);
- return 0;
- }
-
again:
err = get_user_pages_fast(address, 1, 1, &page);
if (err < 0)