Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: dc32bff195b4 ("iov_iter, net: Fold in csum_and_memcpy()")
Cc: David Howells <dhowells@redhat.com>
Cc: stable@vger.kernel.org
Cc: regressions@lists.linux.dev
Signed-off-by: Michael Lass <bevan@bi-co.net>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Michael Lass and committed by
David S. Miller
fe92f874 46eba193

+1 -1
+1 -1
net/core/datagram.c
··· 751 751 size_t len, void *from, void *priv2) 752 752 { 753 753 __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); 755 755 756 756 *csum = csum_block_add(*csum, next, progress); 757 757 return 0;