From: Eric Dumazet <eric.dumazet@gmail•com>
To: Stephen Hemminger <stephen@networkplumber•org>,
Sheng Lan <lansheng@huawei•com>
Cc: davem@davemloft•net, netdev@vger•kernel.org,
netem@lists•linux-foundation.org, xuhanbing@huawei•com,
zhengshaoyu@huawei•com, jiqin.ji@huawei•com,
liuzhiqiang26@huawei•com, yuehaibing@huawei•com
Subject: Re: [PATCH] net: netem: fix skb length BUG_ON in __skb_to_sgvec
Date: Tue, 26 Feb 2019 08:08:17 -0800 [thread overview]
Message-ID: <655edad3-d09a-ea0e-e230-557bdedb712d@gmail.com> (raw)
In-Reply-To: <20190226075906.103fa072@shemminger-XPS-13-9360>
On 02/26/2019 07:59 AM, Stephen Hemminger wrote:
>
>
> Maybe the fix is to stop TSO fragment from overwriting by doing something like:
>
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index 730bc44dbad9..5fe91d0224f6 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -1856,7 +1856,7 @@ static int tso_fragment(struct sock *sk, enum tcp_queue tcp_queue,
> u8 flags;
>
> /* All of a TSO frame must be composed of paged data. */
> - if (skb->len != skb->data_len)
> + if (skb->len != skb->data_len || skb_cloned(skb))
> return tcp_fragment(sk, tcp_queue, skb, len, mss_now, gfp);
>
> buff = sk_stream_alloc_skb(sk, 0, gfp, true);
>
tso_fragment() is only called with packets that were not yet transmit.
prev parent reply other threads:[~2019-02-26 16:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 14:49 [PATCH] net: netem: fix skb length BUG_ON in __skb_to_sgvec Sheng Lan
2019-02-25 16:01 ` Stephen Hemminger
2019-02-26 13:02 ` Sheng Lan
2019-02-26 15:52 ` Eric Dumazet
2019-02-27 11:26 ` Sheng Lan
2019-02-27 15:53 ` Eric Dumazet
2019-02-26 15:59 ` Stephen Hemminger
2019-02-26 16:08 ` Eric Dumazet [this message]
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=655edad3-d09a-ea0e-e230-557bdedb712d@gmail.com \
--to=eric.dumazet@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=jiqin.ji@huawei$(echo .)com \
--cc=lansheng@huawei$(echo .)com \
--cc=liuzhiqiang26@huawei$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=netem@lists$(echo .)linux-foundation.org \
--cc=stephen@networkplumber$(echo .)org \
--cc=xuhanbing@huawei$(echo .)com \
--cc=yuehaibing@huawei$(echo .)com \
--cc=zhengshaoyu@huawei$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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