summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/checksum_32.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-02-17 01:11:48 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2020-05-29 23:11:48 +0300
commitc281a6c1ac6b0867e4341ea801030fa9a62157f9 (patch)
tree9ed14578728ee19f2fcea2dab837888d2ad0503d /arch/x86/include/asm/checksum_32.h
parent0a5ea224b2fdf9dca9291ef7b5a12fd846a5dc34 (diff)
downloadlinux-c281a6c1ac6b0867e4341ea801030fa9a62157f9.tar.xz
x86: switch 32bit csum_and_copy_to_user() to user_access_{begin,end}()
consolidate HAVE_CSUM_COPY_USER for 32bit and 64bit, while are at it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/include/asm/checksum_32.h')
-rw-r--r--arch/x86/include/asm/checksum_32.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/include/asm/checksum_32.h b/arch/x86/include/asm/checksum_32.h
index 2487b7fc2d24..11624c8a9d8d 100644
--- a/arch/x86/include/asm/checksum_32.h
+++ b/arch/x86/include/asm/checksum_32.h
@@ -176,7 +176,6 @@ static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
/*
* Copy and checksum to user
*/
-#define HAVE_CSUM_COPY_USER
static inline __wsum csum_and_copy_to_user(const void *src,
void __user *dst,
int len, __wsum sum,
@@ -185,11 +184,10 @@ static inline __wsum csum_and_copy_to_user(const void *src,
__wsum ret;
might_sleep();
- if (access_ok(dst, len)) {
- stac();
+ if (user_access_begin(dst, len)) {
ret = csum_partial_copy_generic(src, (__force void *)dst,
len, sum, NULL, err_ptr);
- clac();
+ user_access_end();
return ret;
}