netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jose Abreu <jose.abreu@synopsys.com>
To: Pan Bian <bianpan2016@163.com>
Cc: "David S. Miller" <davem@davemloft.net>, <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:02:05 +0000	[thread overview]
Message-ID: <71f99f51-6bdc-0a25-d81c-12dc13f61271@synopsys.com> (raw)
In-Reply-To: <1543396853-35188-1-git-send-email-bianpan2016@163.com>

On 28-11-2018 09:20, Pan Bian wrote:
> The buffer skb is freed via dev_kfree_skb in a loop. After freeing skb,
> the value of packet_count is updated via packet_count++. If packet_count
> happens to equal the upper bound (i.e., budget), the loop will be broken
> and skb may be assigned to desc_data->state.skb. Resulting that
> desc_data->state.skb may point to a freed memory chunk. To fix this, the
> patch sets skb to NULL after dev_kfree_skb(skb).
>
> Signed-off-by: Pan Bian <bianpan2016@163.com>

This is missing the Fixes tag and your patch prefix should be
[PATCH net].

Thanks and Best Regards,
Jose Miguel Abreu

  reply	other threads:[~2018-11-28 10:02 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 [this message]
2018-11-28 18: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=71f99f51-6bdc-0a25-d81c-12dc13f61271@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=bianpan2016@163.com \
    --cc=davem@davemloft.net \
    --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).