Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685361

Re: [PATCH 1/1] bridge: mdb: report complete_info ptr as not a kmemleak

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Eduardo Valentin <eduval@amazon.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] bridge: mdb: report complete_info ptr as not a kmemleak
Date Tue, 11 Jul 2017 23:50:01 +0200
Message-ID <u2bcB-7F4-17@gated-at.bofh.it> (permalink)
References <tZd1g-4pZ-9@gated-at.bofh.it> <tZrGV-5VQ-5@gated-at.bofh.it> <tZV2i-8vO-21@gated-at.bofh.it>
X-Original-To Eduardo Valentin <eduval@amazon.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1499809456; x=1531345456; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=I1FE0kh0YQ1/uvKNoYNQXDC7Kp/vCxfFYvXwzSuAfKI=; b=ZpbuStePMDKeA1ES6RZwfI0YDpOEqoOyw2PKFJmnsTIZ8lJ9vZzelei5 ljjoU1OBjp6az8QLW7LpQ3jnMUJWgC/amihwG3zKBk1ZBxpoW+mWnJ+8a SEs+53mMbArNJF+0T0nlNNoEKdlqeRwkxcTvqzEcRcuyV7U4GNsKiG9KU g=;
X-Ironport-Av E=Sophos;i="5.40,347,1496102400"; d="scan'208";a="679090044"
MIME-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Disposition inline
User-Agent Mutt/1.5.24 (2015-08-30)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 45
Organization linux.* mail to news gateway
X-Original-Cc David Miller <davem@davemloft.net>, <stephen@networkplumber.org>, <bridge@lists.linux-foundation.org>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
X-Original-Date Tue, 11 Jul 2017 14:43:25 -0700
X-Original-Message-ID <20170711214325.GA9190@u40b0340c692b58f6553c.ant.amazon.com>
X-Original-References <1499101594-22421-1-git-send-email-eduval@amazon.com> <20170704.014842.1942928249505987408.davem@davemloft.net> <20170705160514.GA11351@u40b0340c692b58f6553c.ant.amazon.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1685361

Show key headers only | View raw


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 <eduval@amazon.com>
> > 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 <stable@vger.kernel.org> # v4.9+
> > > Reviewed-by: Vallish Vaidyeshwara <vallish@amazon.com>
> > > Signed-off-by: Eduardo Valentin <eduval@amazon.com>
> > 
> > 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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] bridge: mdb: report complete_info ptr as not a kmemleak Eduardo Valentin <eduval@amazon.com> - 2017-07-03 19:10 +0200
  Re: [PATCH 1/1] bridge: mdb: report complete_info ptr as not a  kmemleak David Miller <davem@davemloft.net> - 2017-07-04 10:50 +0200
    Re: [PATCH 1/1] bridge: mdb: report complete_info ptr as not a  kmemleak Eduardo Valentin <eduval@amazon.com> - 2017-07-05 18:10 +0200
      Re: [PATCH 1/1] bridge: mdb: report complete_info ptr as not a  kmemleak Eduardo Valentin <eduval@amazon.com> - 2017-07-11 23:50 +0200

csiph-web