From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vasily Averin <vvs@virtuozzo.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
David Ahern <dsahern@kernel.org>,
Julian Wiedmann <jwi@linux.ibm.com>,
Christoph Paasch <christoph.paasch@gmail.com>,
linux-kernel@vger.kernel.org, kernel@openvz.org
Subject: Re: [PATCH net v10] skb_expand_head() adjust skb->truesize incorrectly
Date: Fri, 22 Oct 2021 12:32:35 -0700 [thread overview]
Message-ID: <a55b298d-703f-d204-d425-a1d0704b2bb8@gmail.com> (raw)
In-Reply-To: <644330dd-477e-0462-83bf-9f514c41edd1@virtuozzo.com>
On 10/22/21 3:28 AM, Vasily Averin wrote:
> Christoph Paasch reports [1] about incorrect skb->truesize
> after skb_expand_head() call in ip6_xmit.
> This may happen because of two reasons:
> - skb_set_owner_w() for newly cloned skb is called too early,
> before pskb_expand_head() where truesize is adjusted for (!skb-sk) case.
> - pskb_expand_head() does not adjust truesize in (skb->sk) case.
> In this case sk->sk_wmem_alloc should be adjusted too.
>
> [1] https://lkml.org/lkml/2021/8/20/1082
>
> Fixes: f1260ff15a71 ("skbuff: introduce skb_expand_head()")
> Fixes: 2d85a1b31dde ("ipv6: ip6_finish_output2: set sk into newly allocated nskb")
> Reported-by: Christoph Paasch <christoph.paasch@gmail.com>
> Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
> ---
> v10: is_skb_wmem() was moved into separate header (it depends on net/tcp.h)
> use it after pskb_expand_head() insted of strange sock_edemux check
SGTM, thanks !
Reviewed-by: Eric Dumazet <edumazet@google.com>
next prev parent reply other threads:[~2021-10-22 19:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 16:24 [RFC net v7] net: skb_expand_head() adjust skb->truesize incorrectly Jakub Kicinski
2021-09-17 18:15 ` Vasily Averin
2021-09-18 10:05 ` Vasily Averin
2021-09-20 18:12 ` Jakub Kicinski
2021-09-20 21:41 ` Vasily Averin
2021-09-21 0:39 ` Jakub Kicinski
2021-09-21 6:36 ` Vasily Averin
2021-09-21 21:25 ` Jakub Kicinski
2021-09-20 21:41 ` [PATCH net v8] " Vasily Averin
2021-09-21 5:21 ` Vasily Averin
2021-10-04 13:00 ` [PATCH net v9] " Vasily Averin
2021-10-04 13:14 ` Vasily Averin
2021-10-04 19:26 ` Eric Dumazet
2021-10-05 5:57 ` Vasily Averin
2021-10-20 16:14 ` Eric Dumazet
2021-10-20 16:18 ` Eric Dumazet
2021-10-22 10:28 ` [PATCH net v10] " Vasily Averin
2021-10-22 19:32 ` Eric Dumazet [this message]
2021-10-22 20:50 ` 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=a55b298d-703f-d204-d425-a1d0704b2bb8@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=christoph.paasch@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=jwi@linux.ibm.com \
--cc=kernel@openvz.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vvs@virtuozzo.com \
--cc=yoshfuji@linux-ipv6.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;
as well as URLs for NNTP newsgroup(s).