Skip to content

Commit fe92f87

Browse files
michaellassdavem330
authored andcommitted
net: Fix from address in memcpy_to_iter_csum()
While inlining csum_and_memcpy() into memcpy_to_iter_csum(), the from address passed to csum_partial_copy_nocheck() was accidentally changed. This causes a regression in applications using UDP, as for example OpenAFS, causing loss of datagrams. Fixes: dc32bff ("iov_iter, net: Fold in csum_and_memcpy()") Cc: David Howells <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Michael Lass <[email protected]> Reviewed-by: Jeffrey Altman <[email protected]> Acked-by: David Howells <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 46eba19 commit fe92f87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/datagram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ size_t memcpy_to_iter_csum(void *iter_to, size_t progress,
751751
size_t len, void *from, void *priv2)
752752
{
753753
__wsum *csum = priv2;
754-
__wsum next = csum_partial_copy_nocheck(from, iter_to, len);
754+
__wsum next = csum_partial_copy_nocheck(from + progress, iter_to, len);
755755

756756
*csum = csum_block_add(*csum, next, progress);
757757
return 0;

0 commit comments

Comments
 (0)