aboutsummaryrefslogtreecommitdiffstats
path: root/arch/csky/lib/usercopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/csky/lib/usercopy.c')
-rw-r--r--arch/csky/lib/usercopy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/csky/lib/usercopy.c b/arch/csky/lib/usercopy.c
index ac9170e2cbb8..647a23986fb5 100644
--- a/arch/csky/lib/usercopy.c
+++ b/arch/csky/lib/usercopy.c
@@ -7,7 +7,7 @@
7unsigned long raw_copy_from_user(void *to, const void *from, 7unsigned long raw_copy_from_user(void *to, const void *from,
8 unsigned long n) 8 unsigned long n)
9{ 9{
10 if (access_ok(VERIFY_READ, from, n)) 10 if (access_ok(from, n))
11 __copy_user_zeroing(to, from, n); 11 __copy_user_zeroing(to, from, n);
12 else 12 else
13 memset(to, 0, n); 13 memset(to, 0, n);
@@ -18,7 +18,7 @@ EXPORT_SYMBOL(raw_copy_from_user);
18unsigned long raw_copy_to_user(void *to, const void *from, 18unsigned long raw_copy_to_user(void *to, const void *from,
19 unsigned long n) 19 unsigned long n)
20{ 20{
21 if (access_ok(VERIFY_WRITE, to, n)) 21 if (access_ok(to, n))
22 __copy_user(to, from, n); 22 __copy_user(to, from, n);
23 return n; 23 return n;
24} 24}
@@ -113,7 +113,7 @@ long strncpy_from_user(char *dst, const char *src, long count)
113{ 113{
114 long res = -EFAULT; 114 long res = -EFAULT;
115 115
116 if (access_ok(VERIFY_READ, src, 1)) 116 if (access_ok(src, 1))
117 __do_strncpy_from_user(dst, src, count, res); 117 __do_strncpy_from_user(dst, src, count, res);
118 return res; 118 return res;
119} 119}
@@ -236,7 +236,7 @@ do { \
236unsigned long 236unsigned long
237clear_user(void __user *to, unsigned long n) 237clear_user(void __user *to, unsigned long n)
238{ 238{
239 if (access_ok(VERIFY_WRITE, to, n)) 239 if (access_ok(to, n))
240 __do_clear_user(to, n); 240 __do_clear_user(to, n);
241 return n; 241 return n;
242} 242}