diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-03-21 12:06:57 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-03-28 18:23:49 -0400 |
commit | 19dbf70c5acce91c6cacfd0983c2b062644fa7a4 (patch) | |
tree | 4e7ecdad6c360c2564a14fea35ab2acc076ade3f /arch/mn10300/include | |
parent | 4df3715efe5ed1e77344c6d5dcbfd75017a2f8b5 (diff) |
mn10300: switch to RAW_COPY_USER
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mn10300/include')
-rw-r--r-- | arch/mn10300/include/asm/uaccess.h | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/arch/mn10300/include/asm/uaccess.h b/arch/mn10300/include/asm/uaccess.h index 1c35be3d8fef..c6966474827f 100644 --- a/arch/mn10300/include/asm/uaccess.h +++ b/arch/mn10300/include/asm/uaccess.h @@ -275,49 +275,20 @@ do { \ } \ } while (0) -/* We let the __ versions of copy_from/to_user inline, because they're often - * used in fast paths and have only a small space overhead. - */ -static inline -unsigned long __copy_from_user_inatomic(void *to, const void __user *from, - unsigned long n) +static inline unsigned long +raw_copy_from_user(void *to, const void __user *from, unsigned long n) { __copy_user(to, from, n); return n; } -static inline -unsigned long __copy_to_user_inatomic(void __user *to, const void *from, - unsigned long n) +static inline unsigned long +raw_copy_to_user(void __user *to, const void *from, unsigned long n) { __copy_user(to, from, n); return n; } - -extern unsigned long __generic_copy_to_user(void __user *, const void *, - unsigned long); -extern unsigned long __generic_copy_from_user(void *, const void __user *, - unsigned long); - -static inline unsigned long __copy_to_user(void __user *to, const void *from, - unsigned long n) -{ - might_fault(); - return __copy_to_user_inatomic(to, from, n); -} - -static inline unsigned long __copy_from_user(void *to, const void __user *from, - unsigned long n) -{ - might_fault(); - return __copy_from_user_inatomic(to, from, n); -} - - -#define copy_to_user(to, from, n) __generic_copy_to_user((to), (from), (n)) -#define copy_from_user(to, from, n) __generic_copy_from_user((to), (from), (n)) - extern long strncpy_from_user(char *dst, const char __user *src, long count); extern long __strncpy_from_user(char *dst, const char __user *src, long count); extern long strnlen_user(const char __user *str, long n); |