Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752019AbdGEQF1 (ORCPT ); Wed, 5 Jul 2017 12:05:27 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:55944 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751887AbdGEQFY (ORCPT ); Wed, 5 Jul 2017 12:05:24 -0400 X-IronPort-AV: E=Sophos;i="5.40,312,1496102400"; d="scan'208";a="291565946" Date: Wed, 5 Jul 2017 09:05:14 -0700 From: Eduardo Valentin To: David Miller CC: , , , , , Subject: Re: [PATCH 1/1] bridge: mdb: report complete_info ptr as not a kmemleak Message-ID: <20170705160514.GA11351@u40b0340c692b58f6553c.ant.amazon.com> References: <1499101594-22421-1-git-send-email-eduval@amazon.com> <20170704.014842.1942928249505987408.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170704.014842.1942928249505987408.davem@davemloft.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 35 On Tue, Jul 04, 2017 at 01:48:42AM -0700, David Miller wrote: > From: Eduardo Valentin > Date: Mon, 3 Jul 2017 10:06:34 -0700 > > > We currently get the following kmemleak report: > ... > > This patch flags the complete_info ptr object as not a leak as it will > > get freed when .complete_priv() is called, > > We don't call .complete_priv(). We call .complete(). True, I can fix this wording in the commit next version. > > for the br mdb case, it > > will be freed at br_mdb_complete(). > > > > Cc: stable # v4.9+ > > Reviewed-by: Vallish Vaidyeshwara > > Signed-off-by: Eduardo Valentin > > I don't understand why kmemleak cannot see this. > > We store the pointer globally when we do the switchdev_port_obv_add() > call and it should be able to see that. I see and agree. But even then I get these reports consistently on RTM_NEWMDB type. This is why I am proposing marking as a non-kmemleak. To me, this is only a leak if .complete() never gets called. -- All the best, Eduardo Valentin