default csum_and_copy_to_user(): don't bother with access_ok()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2020-04-25 18:01:30 -04:00
parent 5904122c46
commit 001c1a655f

View file

@ -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;