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

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

Reply via email to