summaryrefslogtreecommitdiffstats
path: root/arch/mips/oprofile
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/oprofile
parent054838bc019c90511d034fb796dc8c7715460fc2 (diff)
downloadlinux-f0a955f4eeec0f16bdbdd0fb15d8ec0937d1de23.tar.bz2
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/oprofile')
-rw-r--r--arch/mips/oprofile/backtrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/oprofile/backtrace.c b/arch/mips/oprofile/backtrace.c
index 5e645c9a3162..16ace558cd9d 100644
--- a/arch/mips/oprofile/backtrace.c
+++ b/arch/mips/oprofile/backtrace.c
@@ -18,7 +18,7 @@ struct stackframe {
static inline int get_mem(unsigned long addr, unsigned long *result)
{
unsigned long *address = (unsigned long *) addr;
- if (!access_ok(VERIFY_READ, addr, sizeof(unsigned long)))
+ if (!access_ok(VERIFY_READ, address, sizeof(unsigned long)))
return -1;
if (__copy_from_user_inatomic(result, address, sizeof(unsigned long)))
return -3;