Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756164AbdGLDCj (ORCPT ); Tue, 11 Jul 2017 23:02:39 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:46664 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754700AbdGLDCh (ORCPT ); Tue, 11 Jul 2017 23:02:37 -0400 Date: Tue, 11 Jul 2017 20:02:33 -0700 (PDT) Message-Id: <20170711.200233.1157747601793057593.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: fix leak on complete_info ptr on fail path From: David Miller In-Reply-To: <1499810112-11790-1-git-send-email-eduval@amazon.com> References: <1499810112-11790-1-git-send-email-eduval@amazon.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / 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, 11 Jul 2017 20:02:36 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1895 Lines: 41 From: Eduardo Valentin Date: Tue, 11 Jul 2017 14:55:12 -0700 > We currently get the following kmemleak report: > unreferenced object 0xffff8800039d9820 (size 32): > comm "softirq", pid 0, jiffies 4295212383 (age 792.416s) > hex dump (first 32 bytes): > 00 0c e0 03 00 88 ff ff ff 02 00 00 00 00 00 00 ................ > 00 00 00 01 ff 11 00 02 86 dd 00 00 ff ff ff ff ................ > backtrace: > [] kmemleak_alloc+0x4a/0xa0 > [] kmem_cache_alloc_trace+0xb8/0x1c0 > [] __br_mdb_notify+0x2a3/0x300 [bridge] > [] br_mdb_notify+0x6e/0x70 [bridge] > [] br_multicast_add_group+0x109/0x150 [bridge] > [] br_ip6_multicast_add_group+0x58/0x60 [bridge] > [] br_multicast_rcv+0x1d5/0xdb0 [bridge] > [] br_handle_frame_finish+0xcf/0x510 [bridge] > [] br_nf_hook_thresh.part.27+0xb/0x10 [br_netfilter] > [] br_nf_hook_thresh+0x48/0xb0 [br_netfilter] > [] br_nf_pre_routing_finish_ipv6+0x109/0x1d0 [br_netfilter] > [] br_nf_pre_routing_ipv6+0xd0/0x14c [br_netfilter] > [] br_nf_pre_routing+0x197/0x3d0 [br_netfilter] > [] nf_iterate+0x52/0x60 > [] nf_hook_slow+0x5c/0xb0 > [] br_handle_frame+0x1a4/0x2c0 [bridge] > > This happens when switchdev_port_obj_add() fails. This patch > frees complete_info object in the fail path. Applied, thanks. I'm so glad I pushed back on your original patch :-) > Cc: stable # v4.9+ Please do not add stable tags to networking patches, I queue up and submit networking -stable changes myself upon request which I am doing in this case as well. Thanks.