mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Hugh Dickins <hughd@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: fix rc7's __skb_datagram_iter()
Date: Mon, 8 Jul 2024 09:21:27 +0300	[thread overview]
Message-ID: <ae4e55df-6fe6-4cab-ac44-3ed10a63bfbe@grimberg.me> (raw)
In-Reply-To: <58ad4867-6178-54bd-7e49-e35875d012f9@google.com>



On 08/07/2024 6:00, Hugh Dickins wrote:
> X would not start in my old 32-bit partition (and the "n"-handling looks
> just as wrong on 64-bit, but for whatever reason did not show up there):
> "n" must be accumulated over all pages before it's added to "offset" and
> compared with "copy", immediately after the skb_frag_foreach_page() loop.

That is indeed strange. I see the issue. It didn't happen in my local 
testing either.

>
> Fixes: d2d30a376d9c ("net: allow skb_datagram_iter to be called from any context")
> Signed-off-by: Hugh Dickins <hughd@google.com>
> ---
>   net/core/datagram.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/core/datagram.c b/net/core/datagram.c
> index e9ba4c7b449d..ea69d01156e6 100644
> --- a/net/core/datagram.c
> +++ b/net/core/datagram.c
> @@ -420,6 +420,7 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
>   			struct page *p;
>   			u8 *vaddr;
>   
> +			n = 0;

I think its better to reset n right before the skb_frag_foreach_page() 
iteration.

Thanks Hugh for addressing this!

  reply	other threads:[~2024-07-08  6:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08  3:00 Hugh Dickins
2024-07-08  6:21 ` Sagi Grimberg [this message]
2024-07-08 14:46   ` [PATCH v2] " Hugh Dickins
2024-07-08 14:47     ` Sagi Grimberg
2024-07-10 15:36       ` [PATCH v3] " Hugh Dickins
2024-07-10 16:19         ` Paolo Abeni
2024-07-10 16:36           ` Hugh Dickins
2024-07-11 20:43         ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae4e55df-6fe6-4cab-ac44-3ed10a63bfbe@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=edumazet@google.com \
    --cc=hughd@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®