From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: remove useless check in napi_gro_frags()
Date: Thu, 19 Nov 2015 11:54:20 -0800 [thread overview]
Message-ID: <20151119195419.GA6728@ast-mbp.thefacebook.com> (raw)
In-Reply-To: <1447962170.22599.240.camel@edumazet-glaptop2.roam.corp.google.com>
On Thu, Nov 19, 2015 at 11:42:50AM -0800, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> Checking if skb is NULL in napi_gro_frags() is too late.
>
> If skb was NULL, we would crash earlier in napi_frags_skb()
>
> Drivers normally catch napi_get_frags() NULL return value
> before calling napi_gro_frags()
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> net/core/dev.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 41cef3e3f558b857a9093a83f6b0c73f32b8b45f..8d8d34ff68f5800dbcb2958b6a937b9db478e359 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -4465,9 +4465,6 @@ gro_result_t napi_gro_frags(struct napi_struct *napi)
> {
> struct sk_buff *skb = napi_frags_skb(napi);
>
> - if (!skb)
> - return GRO_DROP;
> -
I don't get it. napi_frags_skb() can return valid NULL.
Should it be fixed there as well?
Must be missing something...
next prev parent reply other threads:[~2015-11-19 19:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 19:42 [PATCH net-next] net: remove useless check in napi_gro_frags() Eric Dumazet
2015-11-19 19:54 ` Alexei Starovoitov [this message]
2015-11-19 20:15 ` Eric Dumazet
2015-11-19 20:20 ` Bjørn Mork
2015-11-19 20:33 ` Eric Dumazet
2015-11-19 21:06 ` Aaron Conole
2015-11-19 21:43 ` Eric Dumazet
2015-11-20 19:59 ` David Miller
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=20151119195419.GA6728@ast-mbp.thefacebook.com \
--to=alexei.starovoitov@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.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).