From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D65DC10F0E for ; Mon, 15 Apr 2019 20:23:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 658602075B for ; Mon, 15 Apr 2019 20:23:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728315AbfDOUXC (ORCPT ); Mon, 15 Apr 2019 16:23:02 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:57592 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726743AbfDOUXC (ORCPT ); Mon, 15 Apr 2019 16:23:02 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 456E214D8A2F8; Mon, 15 Apr 2019 13:23:01 -0700 (PDT) Date: Mon, 15 Apr 2019 13:23:00 -0700 (PDT) Message-Id: <20190415.132300.1393304596588046569.davem@davemloft.net> To: sd@queasysnail.net Cc: netdev@vger.kernel.org, j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net, jarod@redhat.com Subject: Re: [PATCH net] bonding: fix event handling for stacked bonds From: David Miller In-Reply-To: <9e7fda25884e8e68b1932a48de58189a08ef906f.1555073754.git.sd@queasysnail.net> References: <9e7fda25884e8e68b1932a48de58189a08ef906f.1555073754.git.sd@queasysnail.net> X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Mon, 15 Apr 2019 13:23:01 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Sabrina Dubroca Date: Fri, 12 Apr 2019 15:04:10 +0200 > When a bond is enslaved to another bond, bond_netdev_event() only > handles the event as if the bond is a master, and skips treating the > bond as a slave. > > This leads to a refcount leak on the slave, since we don't remove the > adjacency to its master and the master holds a reference on the slave. > > Reproducer: > ip link add bondL type bond > ip link add bondU type bond > ip link set bondL master bondU > ip link del bondL > > No "Fixes:" tag, this code is older than git history. > > Signed-off-by: Sabrina Dubroca Applied and queued up for -stable, thanks Sabrina.