* [PATCH] net: Fix from address in memcpy_to_iter_csum()
@ 2024-01-31 15:52 Michael Lass
2024-01-31 16:54 ` Jeffrey E Altman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michael Lass @ 2024-01-31 15:52 UTC (permalink / raw)
To: netdev; +Cc: David Howells, regressions
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>
---
net/core/datagram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/datagram.c b/net/core/datagram.c
index 103d46fa0eeb..a8b625abe242 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -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;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: Fix from address in memcpy_to_iter_csum()
2024-01-31 15:52 [PATCH] net: Fix from address in memcpy_to_iter_csum() Michael Lass
@ 2024-01-31 16:54 ` Jeffrey E Altman
2024-01-31 19:50 ` David Howells
2024-02-02 12:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Jeffrey E Altman @ 2024-01-31 16:54 UTC (permalink / raw)
To: Michael Lass, netdev; +Cc: David Howells, regressions
[-- Attachment #1.1: Type: text/plain, Size: 1184 bytes --]
On 1/31/2024 10:52 AM, Michael Lass wrote:
> 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>
> ---
> net/core/datagram.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/datagram.c b/net/core/datagram.c
> index 103d46fa0eeb..a8b625abe242 100644
> --- a/net/core/datagram.c
> +++ b/net/core/datagram.c
> @@ -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;
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
[-- Attachment #1.2: Type: text/html, Size: 2025 bytes --]
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4039 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: Fix from address in memcpy_to_iter_csum()
2024-01-31 15:52 [PATCH] net: Fix from address in memcpy_to_iter_csum() Michael Lass
2024-01-31 16:54 ` Jeffrey E Altman
@ 2024-01-31 19:50 ` David Howells
2024-02-02 12:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: David Howells @ 2024-01-31 19:50 UTC (permalink / raw)
To: Michael Lass; +Cc: dhowells, netdev, regressions
Michael Lass <bevan@bi-co.net> wrote:
> 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>
Acked-by: David Howells <dhowells@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: Fix from address in memcpy_to_iter_csum()
2024-01-31 15:52 [PATCH] net: Fix from address in memcpy_to_iter_csum() Michael Lass
2024-01-31 16:54 ` Jeffrey E Altman
2024-01-31 19:50 ` David Howells
@ 2024-02-02 12:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-02 12:30 UTC (permalink / raw)
To: Michael Lass; +Cc: netdev, dhowells, regressions
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Wed, 31 Jan 2024 16:52:20 +0100 you wrote:
> 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>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-02 12:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-31 15:52 [PATCH] net: Fix from address in memcpy_to_iter_csum() Michael Lass
2024-01-31 16:54 ` Jeffrey E Altman
2024-01-31 19:50 ` David Howells
2024-02-02 12:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).