diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-03-21 12:02:25 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-04-26 12:05:56 -0400 |
commit | 9a677341cd8de01a9eaf2c24a4b735939e507943 (patch) | |
tree | 2e0a07f71d8fbfd22084c3289b1f5b2ab2bd1aaf /arch/m32r/lib/usercopy.c | |
parent | 8cd920f26785ce42ec6fb807d40de67fc2eb41ce (diff) |
m32r: switch to RAW_COPY_USER
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/m32r/lib/usercopy.c')
-rw-r--r-- | arch/m32r/lib/usercopy.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/arch/m32r/lib/usercopy.c b/arch/m32r/lib/usercopy.c index 6aacf5ba0a58..b3ef2c899f96 100644 --- a/arch/m32r/lib/usercopy.c +++ b/arch/m32r/lib/usercopy.c | |||
@@ -11,28 +11,6 @@ | |||
11 | #include <linux/thread_info.h> | 11 | #include <linux/thread_info.h> |
12 | #include <linux/uaccess.h> | 12 | #include <linux/uaccess.h> |
13 | 13 | ||
14 | unsigned long | ||
15 | __generic_copy_to_user(void __user *to, const void *from, unsigned long n) | ||
16 | { | ||
17 | prefetch(from); | ||
18 | if (access_ok(VERIFY_WRITE, to, n)) | ||
19 | __copy_user(to,from,n); | ||
20 | return n; | ||
21 | } | ||
22 | |||
23 | unsigned long | ||
24 | __generic_copy_from_user(void *to, const void __user *from, unsigned long n) | ||
25 | { | ||
26 | unsigned long ret = n; | ||
27 | prefetchw(to); | ||
28 | if (access_ok(VERIFY_READ, from, n)) | ||
29 | ret = __copy_user(to,from,n); | ||
30 | if (unlikely(ret)) | ||
31 | memset(to + n - ret, 0, ret); | ||
32 | return ret; | ||
33 | } | ||
34 | |||
35 | |||
36 | /* | 14 | /* |
37 | * Copy a null terminated string from userspace. | 15 | * Copy a null terminated string from userspace. |
38 | */ | 16 | */ |