Skip to content

Commit

Permalink
sh32: convert to csum_and_copy_from_user()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed May 29, 2020
1 parent 8084c99 commit 7fe8970
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions arch/sh/include/asm/checksum_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,17 @@ __wsum csum_partial_copy_nocheck(const void *src, void *dst,
return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL);
}

#define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER
static inline
__wsum csum_partial_copy_from_user(const void __user *src, void *dst,
__wsum csum_and_copy_from_user(const void __user *src, void *dst,
int len, __wsum sum, int *err_ptr)
{
return csum_partial_copy_generic((__force const void *)src, dst,
if (access_ok(src, len))
return csum_partial_copy_generic((__force const void *)src, dst,
len, sum, err_ptr, NULL);
if (len)
*err_ptr = -EFAULT;
return sum;
}

/*
Expand Down

0 comments on commit 7fe8970

Please sign in to comment.