netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Mugunthan V N <mugunthanvnm@ti.com>,
	Sekhar Nori <nsekhar@ti.com>,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH] drivers: net: cpsw: fix kmemleak false-positive reports for sk buffers
Date: Tue, 9 Aug 2016 16:19:37 +0100	[thread overview]
Message-ID: <20160809151937.GA15447@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <20160809120944.23185-1-grygorii.strashko@ti.com>

On Tue, Aug 09, 2016 at 03:09:44PM +0300, Grygorii Strashko wrote:
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index 0805855..0456e0e 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -732,6 +732,7 @@ static void cpsw_rx_handler(void *token, int len, int status)
>  		netif_receive_skb(skb);
>  		ndev->stats.rx_bytes += len;
>  		ndev->stats.rx_packets++;
> +		kmemleak_not_leak(new_skb);
>  	} else {
>  		ndev->stats.rx_dropped++;
>  		new_skb = skb;
> @@ -1323,6 +1324,7 @@ static int cpsw_ndo_open(struct net_device *ndev)
>  				kfree_skb(skb);
>  				goto err_cleanup;
>  			}
> +			kmemleak_not_leak(skb);

Nitpick: I would add a short comment above the kmemleak_not_leak() calls
on why there is a false positive. Otherwise:

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

  reply	other threads:[~2016-08-09 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09 12:09 [PATCH] drivers: net: cpsw: fix kmemleak false-positive reports for sk buffers Grygorii Strashko
2016-08-09 15:19 ` Catalin Marinas [this message]
2016-08-10 16:55 ` Mugunthan V N

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=20160809151937.GA15447@e104818-lin.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=davem@davemloft.net \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /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).