From: stranche@codeaurora.org
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
Willem de Bruijn <willemb@google.com>,
David Miller <davem@davemloft.net>,
Network Development <netdev@vger.kernel.org>,
Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Subject: Re: [PATCH net-next] udp: Fix kernel panic in UDP GSO path
Date: Mon, 14 May 2018 16:45:57 -0600 [thread overview]
Message-ID: <c86a2fbde50aea2b28e82c333f29d575@codeaurora.org> (raw)
In-Reply-To: <CAF=yD-JH8ahoLNKOVjBScRXKP4UQqQpfq89C6xq0=nwd3jQtzw@mail.gmail.com>
On 2018-05-11 17:16, Willem de Bruijn wrote:
>> Hmm, no, we absolutely need to fix GSO instead.
>>
>> Think of a bonding device (or any virtual devices), your patch wont
>> avoid the crash.
Hi Eric. Can you clarify what you mean by "fix GSO?" Is that just having
the GSO path work
regardless of whether or not SG is enabled for the device?
>
> Thanks for reporting the issue.
>
> Paged skbuffs is an optimization for gso, but the feature should
> continue to work even if gso skbs are linear, indeed (if at the cost
> of copying during skb_segment).
>
> We need to make paged contingent on scatter-gather. Rough
> patch below. That is for ipv4 only, the same will be needed for ipv6.
>
> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
> index b5e21eb198d8..b38731d8a44f 100644
> --- a/net/ipv4/ip_output.c
> +++ b/net/ipv4/ip_output.c
> @@ -884,7 +884,7 @@ static int __ip_append_data(struct sock *sk,
>
> exthdrlen = !skb ? rt->dst.header_len : 0;
> mtu = cork->gso_size ? IP_MAX_MTU : cork->fragsize;
> - paged = !!cork->gso_size;
> + paged = cork->gso_size && (rt->dst.dev->features & NETIF_F_SG);
Hi Willem. That's definitely a much cleaner patch than ours since it
allows the GSO to continue without failure.
We tried it on both the IPv4 and IPv6 path and didn't see the crash in
either case.
-----
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2018-05-14 22:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 0:38 [PATCH net-next] udp: Fix kernel panic in UDP GSO path Sean Tranchetti
2018-05-11 0:51 ` Eric Dumazet
2018-05-11 23:16 ` Willem de Bruijn
2018-05-14 22:45 ` stranche [this message]
2018-05-14 23:07 ` Willem de Bruijn
2018-05-14 23:10 ` Eric Dumazet
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=c86a2fbde50aea2b28e82c333f29d575@codeaurora.org \
--to=stranche@codeaurora.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=subashab@codeaurora.org \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
/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