Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934136AbdGKVoU (ORCPT ); Tue, 11 Jul 2017 17:44:20 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:33156 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932740AbdGKVoQ (ORCPT ); Tue, 11 Jul 2017 17:44:16 -0400 X-IronPort-AV: E=Sophos;i="5.40,347,1496102400"; d="scan'208";a="679090044" Date: Tue, 11 Jul 2017 14:43:25 -0700 From: Eduardo Valentin To: Eduardo Valentin CC: David Miller , , , , , Subject: Re: [PATCH 1/1] bridge: mdb: report complete_info ptr as not a kmemleak Message-ID: <20170711214325.GA9190@u40b0340c692b58f6553c.ant.amazon.com> References: <1499101594-22421-1-git-send-email-eduval@amazon.com> <20170704.014842.1942928249505987408.davem@davemloft.net> <20170705160514.GA11351@u40b0340c692b58f6553c.ant.amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170705160514.GA11351@u40b0340c692b58f6553c.ant.amazon.com> 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: 1396 Lines: 45 On Wed, Jul 05, 2017 at 09:05:14AM -0700, Eduardo Valentin wrote: > 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. Ok. So, in fact, I believe the problem I am seeing in more when switchdev_port_obj_add() fails. I will send a patch for that. > > > -- > All the best, > Eduardo Valentin -- All the best, Eduardo Valentin