diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-12-27 16:10:53 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-04-06 08:08:06 +0200 |
commit | f0a955f4eeec0f16bdbdd0fb15d8ec0937d1de23 (patch) | |
tree | 1e77a3e2c8d597c699ea50ac16f1e2d83a232b26 /arch/mips/oprofile/backtrace.c | |
parent | Merge commit 'fc69910f329d' into uaccess.mips (diff) | |
download | linux-f0a955f4eeec0f16bdbdd0fb15d8ec0937d1de23.tar.xz 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 '')
-rw-r--r-- | arch/mips/oprofile/backtrace.c | 2 |
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; |