summaryrefslogtreecommitdiff
path: root/include/net/checksum.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-04-25 18:01:30 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2020-05-29 16:11:50 -0400
commit001c1a655f0a4e4ebe5d9beb47466dc5c6ab4871 (patch)
treebb30ece73d5fdac6663429a43f37a2f992494c8c /include/net/checksum.h
parent5904122c46581a5ccee54a51ef07e0d891fd7aef (diff)
default csum_and_copy_to_user(): don't bother with access_ok()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/net/checksum.h')
-rw-r--r--include/net/checksum.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/net/checksum.h b/include/net/checksum.h
index 5f9c73c0eeb9..46754ba9d7b7 100644
--- a/include/net/checksum.h
+++ b/include/net/checksum.h
@@ -38,10 +38,8 @@ static __inline__ __wsum csum_and_copy_to_user
{
sum = csum_partial(src, len, sum);
- if (access_ok(dst, len)) {
- if (copy_to_user(dst, src, len) == 0)
- return sum;
- }
+ if (copy_to_user(dst, src, len) == 0)
+ return sum;
if (len)
*err_ptr = -EFAULT;