diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-03-20 21:08:07 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-03-28 16:43:25 -0400 |
commit | db68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63 (patch) | |
tree | 77eda1d247853a2d414e0047c620b3c72bb11a1a /arch/arm/lib/uaccess_with_memcpy.c | |
parent | aaa2e7ac80f679230faf28a8e12e8d68dbe977eb (diff) |
new helper: uaccess_kernel()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/arm/lib/uaccess_with_memcpy.c')
-rw-r--r-- | arch/arm/lib/uaccess_with_memcpy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c index 6bd1089b07e0..9b4ed1728616 100644 --- a/arch/arm/lib/uaccess_with_memcpy.c +++ b/arch/arm/lib/uaccess_with_memcpy.c | |||
@@ -90,7 +90,7 @@ __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n) | |||
90 | unsigned long ua_flags; | 90 | unsigned long ua_flags; |
91 | int atomic; | 91 | int atomic; |
92 | 92 | ||
93 | if (unlikely(segment_eq(get_fs(), KERNEL_DS))) { | 93 | if (uaccess_kernel()) { |
94 | memcpy((void *)to, from, n); | 94 | memcpy((void *)to, from, n); |
95 | return 0; | 95 | return 0; |
96 | } | 96 | } |
@@ -162,7 +162,7 @@ __clear_user_memset(void __user *addr, unsigned long n) | |||
162 | { | 162 | { |
163 | unsigned long ua_flags; | 163 | unsigned long ua_flags; |
164 | 164 | ||
165 | if (unlikely(segment_eq(get_fs(), KERNEL_DS))) { | 165 | if (uaccess_kernel()) { |
166 | memset((void *)addr, 0, n); | 166 | memset((void *)addr, 0, n); |
167 | return 0; | 167 | return 0; |
168 | } | 168 | } |