summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/syscall.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-12-27 10:10:53 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2017-04-06 02:08:06 -0400
commitf0a955f4eeec0f16bdbdd0fb15d8ec0937d1de23 (patch)
tree1e77a3e2c8d597c699ea50ac16f1e2d83a232b26 /arch/mips/kernel/syscall.c
parent054838bc019c90511d034fb796dc8c7715460fc2 (diff)
downloadblackbird-op-linux-f0a955f4eeec0f16bdbdd0fb15d8ec0937d1de23.tar.gz
blackbird-op-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.c2
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) {
OpenPOWER on IntegriCloud