lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151119195419.GA6728@ast-mbp.thefacebook.com>
Date:	Thu, 19 Nov 2015 11:54:20 -0800
From:	Alexei Starovoitov <alexei.starovoitov@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: remove useless check in napi_gro_frags()

On Thu, Nov 19, 2015 at 11:42:50AM -0800, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.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@...gle.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...

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ