aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/lib/uaccess.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/tile/lib/uaccess.c')
-rw-r--r--arch/tile/lib/uaccess.c3
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 @@
18int __range_ok(unsigned long addr, unsigned long size) 18int __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}
25EXPORT_SYMBOL(__range_ok); 24EXPORT_SYMBOL(__range_ok);
26 25
26#ifdef CONFIG_DEBUG_COPY_FROM_USER
27void copy_from_user_overflow(void) 27void copy_from_user_overflow(void)
28{ 28{
29 WARN(1, "Buffer overflow detected!\n"); 29 WARN(1, "Buffer overflow detected!\n");
30} 30}
31EXPORT_SYMBOL(copy_from_user_overflow); 31EXPORT_SYMBOL(copy_from_user_overflow);
32#endif