Merge branch 'uaccess.futex' of git://git.kernel.org/pub/scm/linux/kernel/git/viro...
[linux-block.git] / kernel / futex.c
index b62cf942e4b777f51e5f098edb12207fa22d7c13..23bc277ef6f663dec9159bf6fca73ec6f40faa35 100644 (file)
@@ -1665,10 +1665,9 @@ static int futex_atomic_op_inuser(unsigned int encoded_op, u32 __user *uaddr)
                oparg = 1 << oparg;
        }
 
-       if (!access_ok(uaddr, sizeof(u32)))
-               return -EFAULT;
-
+       pagefault_disable();
        ret = arch_futex_atomic_op_inuser(op, oparg, &oldval, uaddr);
+       pagefault_enable();
        if (ret)
                return ret;