Skip to content

Commit 5fff09b

Browse files
jcmvbkbcAl Viro
authored andcommitted
xtensa: fix access check in csum_and_copy_from_user
Commit d341659 ("xtensa: switch to providing csum_and_copy_from_user()") introduced access check, but incorrectly tested dst instead of src. Fix access_ok argument in csum_and_copy_from_user. Cc: Al Viro <[email protected]> Fixes: d341659 ("xtensa: switch to providing csum_and_copy_from_user()") Signed-off-by: Max Filippov <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent b3a9e3b commit 5fff09b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/xtensa/include/asm/checksum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static inline
5757
__wsum csum_and_copy_from_user(const void __user *src, void *dst,
5858
int len, __wsum sum, int *err_ptr)
5959
{
60-
if (access_ok(dst, len))
60+
if (access_ok(src, len))
6161
return csum_partial_copy_generic((__force const void *)src, dst,
6262
len, sum, err_ptr, NULL);
6363
if (len)

0 commit comments

Comments
 (0)