From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752730AbcHIPTp (ORCPT ); Tue, 9 Aug 2016 11:19:45 -0400 Received: from foss.arm.com ([217.140.101.70]:42967 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751726AbcHIPTm (ORCPT ); Tue, 9 Aug 2016 11:19:42 -0400 Date: Tue, 9 Aug 2016 16:19:37 +0100 From: Catalin Marinas To: Grygorii Strashko Cc: "David S. Miller" , netdev@vger.kernel.org, Mugunthan V N , Sekhar Nori , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [PATCH] drivers: net: cpsw: fix kmemleak false-positive reports for sk buffers Message-ID: <20160809151937.GA15447@e104818-lin.cambridge.arm.com> References: <20160809120944.23185-1-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160809120944.23185-1-grygorii.strashko@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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