Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752362AbdGDIss (ORCPT ); Tue, 4 Jul 2017 04:48:48 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:46246 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbdGDIsr (ORCPT ); Tue, 4 Jul 2017 04:48:47 -0400 Date: Tue, 04 Jul 2017 01:48:42 -0700 (PDT) Message-Id: <20170704.014842.1942928249505987408.davem@davemloft.net> To: eduval@amazon.com Cc: stephen@networkplumber.org, bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 1/1] bridge: mdb: report complete_info ptr as not a kmemleak From: David Miller In-Reply-To: <1499101594-22421-1-git-send-email-eduval@amazon.com> References: <1499101594-22421-1-git-send-email-eduval@amazon.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 04 Jul 2017 01:48:46 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 694 Lines: 21 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(). 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.