Message ID | 20200824082358.185932364@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=P6ku=CC=vger.kernel.org=stable-owner@kernel.org> 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=-13.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable 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 8F9ACC433E1 for <stable@archiver.kernel.org>; Mon, 24 Aug 2020 09:01:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 625DB206BE for <stable@archiver.kernel.org>; Mon, 24 Aug 2020 09:01:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598259712; bh=6s+LfmSm2tHtB+r5qdc2/fKe1QoC776GhXu++sKHNeA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=F8ElecTYAohdW79uVaw5nC/3EHLeN2Og637qNB7ldc0vCC5mjaW9p9dwqVoInVuus BW2VFzmPlcZdyRxSYFXTO+1NdSNLzsAWHdvC5/wf7OrEIEKS4SfZ94WP/T/FRFfsjb t2OIqtkc99unGfLN7zTfWhOj96WvIx2yHbbxj1YE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730161AbgHXJBq (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 24 Aug 2020 05:01:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:42754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730569AbgHXI4q (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 24 Aug 2020 04:56:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EBE20206F0; Mon, 24 Aug 2020 08:56:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598259405; bh=6s+LfmSm2tHtB+r5qdc2/fKe1QoC776GhXu++sKHNeA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T2zC/U16X2h25EjyOoClUvVHRdp8b7lzXUJN1fBlZ2wbdRhHGybJGP0hvrB7sYAN1 aClBLaMN02hBgnW5D6xAm/NXLviZvpzyuORbi/o4/FTEJXwc52c5yZAo1bFgK3mcVx m0wkm2DQYXYiB4AVvNoB88zfB67bDI9taH8ckGJM= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, syzbot+af23e7f3e0a7e10c8b67@syzkaller.appspotmail.com, Eric Dumazet <eric.dumazet@gmail.com>, Andy Gospodarek <andy@greyhouse.net>, Jay Vosburgh <j.vosburgh@gmail.com>, Cong Wang <xiyou.wangcong@gmail.com>, "David S. Miller" <davem@davemloft.net>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.19 46/71] bonding: fix a potential double-unregister Date: Mon, 24 Aug 2020 10:31:37 +0200 Message-Id: <20200824082358.185932364@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200824082355.848475917@linuxfoundation.org> References: <20200824082355.848475917@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 76fd5fc437ebe..ee7138a92d5e7 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -2029,7 +2029,8 @@ static int bond_release_and_destroy(struct net_device *bond_dev, int ret; ret = __bond_release_one(bond_dev, slave_dev, false, true); - if (ret == 0 && !bond_has_slaves(bond)) { + if (ret == 0 && !bond_has_slaves(bond) && + bond_dev->reg_state != NETREG_UNREGISTERING) { bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; netdev_info(bond_dev, "Destroying bond %s\n", bond_dev->name);