Skip to content

Commit

Permalink
net: Fix from address in memcpy_to_iter_csum()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
michaellass authored and davem330 committed Feb 2, 2024
1 parent 46eba19 commit fe92f87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ size_t memcpy_to_iter_csum(void *iter_to, size_t progress,
size_t len, void *from, void *priv2)
{
__wsum *csum = priv2;
__wsum next = csum_partial_copy_nocheck(from, iter_to, len);
__wsum next = csum_partial_copy_nocheck(from + progress, iter_to, len);

*csum = csum_block_add(*csum, next, progress);
return 0;
Expand Down

0 comments on commit fe92f87

Please sign in to comment.