diff options
author | Al Viro | 2016-12-27 16:10:53 +0100 |
---|---|---|
committer | Al Viro | 2017-04-06 08:08:06 +0200 |
commit | f0a955f4eeec0f16bdbdd0fb15d8ec0937d1de23 (patch) | |
tree | 1e77a3e2c8d597c699ea50ac16f1e2d83a232b26 /arch/mips/kernel/syscall.c | |
parent | Merge commit 'fc69910f329d' into uaccess.mips (diff) | |
download | kernel-qcow2-linux-f0a955f4eeec0f16bdbdd0fb15d8ec0937d1de23.tar.gz kernel-qcow2-linux-f0a955f4eeec0f16bdbdd0fb15d8ec0937d1de23.tar.xz kernel-qcow2-linux-f0a955f4eeec0f16bdbdd0fb15d8ec0937d1de23.zip |
mips: sanitize __access_ok()
for one thing, the last argument is always __access_mask and had been such
since 2.4.0-test3pre8; for another, it can bloody well be a static inline -
-O2 or -Os, __builtin_constant_p() propagates through static inline calls.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips/kernel/syscall.c')
-rw-r--r-- | arch/mips/kernel/syscall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index f1d17ece4181..1dfa7f5796c7 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -98,7 +98,7 @@ static inline int mips_atomic_set(unsigned long addr, unsigned long new) if (unlikely(addr & 3)) return -EINVAL; - if (unlikely(!access_ok(VERIFY_WRITE, addr, 4))) + if (unlikely(!access_ok(VERIFY_WRITE, (const void __user *)addr, 4))) return -EINVAL; if (cpu_has_llsc && R10000_LLSC_WAR) { |