mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
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:
parent
5904122c46
commit
001c1a655f
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue