aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/uaccess_32.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include/asm/uaccess_32.h')
-rw-r--r--arch/sparc/include/asm/uaccess_32.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h
index 25f1d10155e8..8303ac481034 100644
--- a/arch/sparc/include/asm/uaccess_32.h
+++ b/arch/sparc/include/asm/uaccess_32.h
@@ -260,23 +260,8 @@ static inline unsigned long __copy_to_user(void __user *to, const void *from, un
260 return __copy_user(to, (__force void __user *) from, n); 260 return __copy_user(to, (__force void __user *) from, n);
261} 261}
262 262
263extern void copy_from_user_overflow(void)
264#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
265 __compiletime_error("copy_from_user() buffer size is not provably correct")
266#else
267 __compiletime_warning("copy_from_user() buffer size is not provably correct")
268#endif
269;
270
271static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) 263static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
272{ 264{
273 int sz = __compiletime_object_size(to);
274
275 if (unlikely(sz != -1 && sz < n)) {
276 copy_from_user_overflow();
277 return n;
278 }
279
280 if (n && __access_ok((unsigned long) from, n)) 265 if (n && __access_ok((unsigned long) from, n))
281 return __copy_user((__force void __user *) to, from, n); 266 return __copy_user((__force void __user *) to, from, n);
282 else 267 else