From: Al Viro Date: Sat, 25 Apr 2020 22:01:30 +0000 (-0400) Subject: default csum_and_copy_to_user(): don't bother with access_ok() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=001c1a655f0a4e4ebe5d9beb47466dc5c6ab4871;p=linux.git default csum_and_copy_to_user(): don't bother with access_ok() Signed-off-by: Al Viro --- diff --git a/include/net/checksum.h b/include/net/checksum.h index 5f9c73c0eeb91..46754ba9d7b70 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;