diff options
Diffstat (limited to 'arch/tile/lib/uaccess.c')
-rw-r--r-- | arch/tile/lib/uaccess.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/tile/lib/uaccess.c b/arch/tile/lib/uaccess.c index 9ae182568b77..f8d398c9ee7f 100644 --- a/arch/tile/lib/uaccess.c +++ b/arch/tile/lib/uaccess.c | |||
@@ -18,14 +18,15 @@ | |||
18 | int __range_ok(unsigned long addr, unsigned long size) | 18 | int __range_ok(unsigned long addr, unsigned long size) |
19 | { | 19 | { |
20 | unsigned long limit = current_thread_info()->addr_limit.seg; | 20 | unsigned long limit = current_thread_info()->addr_limit.seg; |
21 | __chk_user_ptr(addr); | ||
22 | return !((addr < limit && size <= limit - addr) || | 21 | return !((addr < limit && size <= limit - addr) || |
23 | is_arch_mappable_range(addr, size)); | 22 | is_arch_mappable_range(addr, size)); |
24 | } | 23 | } |
25 | EXPORT_SYMBOL(__range_ok); | 24 | EXPORT_SYMBOL(__range_ok); |
26 | 25 | ||
26 | #ifdef CONFIG_DEBUG_COPY_FROM_USER | ||
27 | void copy_from_user_overflow(void) | 27 | void copy_from_user_overflow(void) |
28 | { | 28 | { |
29 | WARN(1, "Buffer overflow detected!\n"); | 29 | WARN(1, "Buffer overflow detected!\n"); |
30 | } | 30 | } |
31 | EXPORT_SYMBOL(copy_from_user_overflow); | 31 | EXPORT_SYMBOL(copy_from_user_overflow); |
32 | #endif | ||