Pull uaccess futex cleanups for Al Viro: Consolidate access_ok() usage and the futex uaccess function zoo.
Showing the changes to kernel (1 of 22 files). Show all
Unified · Split
| @@ -1665,10 +1665,9 @@ static int futex_atomic_op_inuser(unsigned int encoded_op, u32 __user *uaddr) · 1664 unmodified lines | |||
| 1665 | oparg = 1 << oparg; | 1665 | oparg = 1 << oparg; |
| 1666 | } | 1666 | } |
| 1667 | 1667 | ||
| 1668 | if (!access_ok(uaddr, sizeof(u32))) | 1668 | pagefault_disable(); |
| 1669 | return -EFAULT; | ||
| 1670 | |||
| 1671 | ret = arch_futex_atomic_op_inuser(op, oparg, &oldval, uaddr); | 1669 | ret = arch_futex_atomic_op_inuser(op, oparg, &oldval, uaddr); |
| 1670 | pagefault_enable(); | ||
| 1672 | if (ret) | 1671 | if (ret) |
| 1673 | return ret; | 1672 | return ret; |
| 1674 | 1673 | ||