Skip to content

Commit 001c1a6

Browse files
author
Al Viro
committed
default csum_and_copy_to_user(): don't bother with access_ok()
Signed-off-by: Al Viro <[email protected]>
1 parent 5904122 commit 001c1a6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/net/checksum.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ static __inline__ __wsum csum_and_copy_to_user
3838
{
3939
sum = csum_partial(src, len, sum);
4040

41-
if (access_ok(dst, len)) {
42-
if (copy_to_user(dst, src, len) == 0)
43-
return sum;
44-
}
41+
if (copy_to_user(dst, src, len) == 0)
42+
return sum;
4543
if (len)
4644
*err_ptr = -EFAULT;
4745

0 commit comments

Comments
 (0)