netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: bianpan2016@163.com
Cc: Jose.Abreu@synopsys.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: dwc-xlgmac: set skb to NULL after freeing it
Date: Wed, 28 Nov 2018 10:59:06 -0800 (PST)	[thread overview]
Message-ID: <20181128.105906.2127945279482643879.davem@davemloft.net> (raw)
In-Reply-To: <1543396853-35188-1-git-send-email-bianpan2016@163.com>

From: Pan Bian <bianpan2016@163.com>
Date: Wed, 28 Nov 2018 17:20:53 +0800

> @@ -1180,6 +1180,7 @@ static int xlgmac_rx_poll(struct xlgmac_channel *channel, int budget)
>  				netif_err(pdata, rx_err, netdev,
>  					  "error in received packet\n");
>  			dev_kfree_skb(skb);
> +			skb = NULL;
>  			goto next_packet;
>  		}
>  
> @@ -1227,6 +1228,7 @@ static int xlgmac_rx_poll(struct xlgmac_channel *channel, int budget)
>  			netif_err(pdata, rx_err, netdev,
>  				  "packet length exceeds configured MTU\n");
>  			dev_kfree_skb(skb);
> +			skb = NULL;
>  			goto next_packet;
>  		}

Same problem as your amd-xgbe patch, the condition you say can occurr is
actually impossible.

      parent reply	other threads:[~2018-11-28 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28  9:20 [PATCH] net: dwc-xlgmac: set skb to NULL after freeing it Pan Bian
2018-11-28 10:02 ` Jose Abreu
2018-11-28 18:59 ` David Miller [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=20181128.105906.2127945279482643879.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Jose.Abreu@synopsys.com \
    --cc=bianpan2016@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).