net: Fix from address in memcpy_to_iter_csum()
Subsystems (4)
PATCH 1/1 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.
--- net/core/datagram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/datagram.c +1 -1
@@ -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 ;
Signature · 1 line
2.43.0
Quoted 19 lines · Michael Lass
While inlining
csum_and_memcpy()intomemcpy_to_iter_csum(), the from address passed tocsum_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<[email protected]>Signed-off-by Michael Lass<[email protected]>--- net/core/datagram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/core/datagram.c +0
-0
net/core/datagram.c size_t memcpy_to_iter_csum(void *iter_to, size_t progress, · line 757
Quoted 8 lines
net/core/datagram.c +1
-1@@ -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 ;
Quoted 10 lines · Michael Lass
While inlining
csum_and_memcpy()intomemcpy_to_iter_csum(), the from address passed tocsum_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 <[email protected]>Signed-off-by Michael Lass <[email protected]>
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 5 lines · On Wed, 31 Jan 2024 16:52:20 +0100 you wrote:
While inlining
csum_and_memcpy()intomemcpy_to_iter_csum(), the from address passed tocsum_partial_copy_nocheck()was accidentally changed. This causes a regression in applications using UDP, as for example OpenAFS, causing loss of datagrams.
Quoted 7 lines
Fixes dc32bff195b4 ("iov_iter, net: Fold in csum_and_memcpy()")Cc David Howells <[email protected]>Signed-off-by Michael Lass <[email protected]>[...]
Here is the summary with links:
- net: Fix from address in memcpy_to_iter_csum()
https://git.kernel.org/netdev/net/c/fe92f874f091
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Backport request: commit fe92f874f091 ("net: Fix from address in memcpy_to_iter_csum()")
In reply to Michael LassPlease backport to stable 6.7 the following patch which was merged upstream as
commit fe92f874f09145a6951deacaa4961390238bbe0d
Author: Michael Lass <[email protected]>
Date: Wed Jan 31 16:52:20 2024 +0100
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.
Thank you.
-------- Forwarded Message --------
Subject: [PATCH] net: Fix from address in memcpy_to_iter_csum()
Date: Wed, 31 Jan 2024 16:52:20 +0100
From: Michael Lass <[email protected]>
To: [email protected]
CC: David Howells <[email protected]>, [email protected]
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.
---net/core/datagram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
net/core/datagram.c +0 -0
@@ -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;
Signature · 1 line
2.43.0
Re: Backport request: commit fe92f874f091 ("net: Fix from address in memcpy_to_iter_csum()")
Quoted 14 lines · Jeffrey E Altman
Please backport to stable 6.7 the following patch which was merged upstream as
commit
fe92f874f09145a6951deacaa4961390238bbe0d
Author: Michael Lass <[email protected]>
Date: Wed Jan 31 16:52:20 2024 +0100net: Fix from address in
memcpy_to_iter_csum()While inlining
csum_and_memcpy()intomemcpy_to_iter_csum(), the from address passed tocsum_partial_copy_nocheck()was accidentally changed. This causes a regression in applications using UDP, as for example OpenAFS, causing loss of datagrams.
Quoted 9 lines
Fixes dc32bff195b4 ("iov_iter, net: Fold in csum_and_memcpy()")Cc David Howells <[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]>
Now queued up, thanks.
greg k-h