Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2902975iog; Mon, 27 Jun 2022 05:26:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vCCZbx+D5xEM7GfnRYrNjRT+PTre3bnjHCslwtdYuStBn26+vB7kLCkvymsmK4leuBfGNs X-Received: by 2002:a17:902:9b8b:b0:16a:14fa:cd27 with SMTP id y11-20020a1709029b8b00b0016a14facd27mr14386616plp.86.1656332781856; Mon, 27 Jun 2022 05:26:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656332781; cv=none; d=google.com; s=arc-20160816; b=KdUPEinwjVf5mNlYlE3JGzUenV14l9Jia4QdrBlZ2p2DgvRoSGaKKeUzLNHSytnZvR 8jgWD9qboJsBrKUjngJv0s9fbhJCzxNMtkB4VjYYz8KMpa81MM9FX81pxG6Qs8mHoxK6 HUtN3zH/gbbFfEb11EsWTq3HWZdtRRlCCeaYuvxpkESBrrGN+hX/7zRWCVVc/q4yFyob uvUSD9WWmfUvM7kMQUe/YsXH46ZLiP7Dfc7ovk78RGTs+oNHJD6pw8tpikqS0uCCKp3k MnLp4RIw09s3oKzO/B7L1Fy0uduf65A7pxcmOzMhsMiHxoXa6C9qP3y9HVG0/cScojpI oHIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wO94D0O/jx5qhUQVQNv9zL0RwSrkJ+XzSsIbPnpQLoE=; b=TFhuDRr+opaxbfJBnx//rGWTwaivUBajEropkIofTyxZjx+GzyRPedagj1n4xSGTxY H0EmIu+fKjaCc7LBwEePVeQSj0jNjfPdwZ9LE4RHs7TWdJSLwccfauuTy2KXOv/t5Ilu iAeiFwRIWolTZogTAp+JB3gH/GSBEgvCR2jUKYuy561bvbYvr/uxMJgGxlFMcSlbKhZ8 3rtjXgmuP5ctda7GrsipQfg61buBfTV7RomQDFMZjTgNawI/NeoK7vzzl5Xjn60kfbos a45Kwo830x0McmsaKD7C3R5NAW3CM8YXgxRh2RNYp63ljlOVU3pKRm9OkMckXNhgogd1 V91g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=enlxmACx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl2-20020a17090b384200b001e68b44501esi17105733pjb.5.2022.06.27.05.26.09; Mon, 27 Jun 2022 05:26:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=enlxmACx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234766AbiF0LYe (ORCPT + 99 others); Mon, 27 Jun 2022 07:24:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234731AbiF0LYU (ORCPT ); Mon, 27 Jun 2022 07:24:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2D9E6586; Mon, 27 Jun 2022 04:24:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3E97D61476; Mon, 27 Jun 2022 11:24:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36B3EC3411D; Mon, 27 Jun 2022 11:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329055; bh=Kvlf2zbqYtcRyjhUTmX+6OnAyBmwSU6Bg/DipYrK7PY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=enlxmACxkM8c7AU4w5xntScCFssozZb6pcMDeLMjZ+qkOn+YEd97ltbpST26vHqX7 K5rMJPmdkJI5stpbRUNPRj1AsP1NgwDjytl7NPWQy1/xiUneBAcTdiIpgYbY2rxW+u 7N1cbMufP1ceGAK3l6AHZicQ0iW1dQ7ZSG94VCmk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Toppins , Jay Vosburgh , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 034/102] bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers Date: Mon, 27 Jun 2022 13:20:45 +0200 Message-Id: <20220627111934.476508972@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111933.455024953@linuxfoundation.org> References: <20220627111933.455024953@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jay Vosburgh [ Upstream commit 7a9214f3d88cfdb099f3896e102a306b316d8707 ] The bonding ARP monitor fails to decrement send_peer_notif, the number of peer notifications (gratuitous ARP or ND) to be sent. This results in a continuous series of notifications. Correct this by decrementing the counter for each notification. Reported-by: Jonathan Toppins Signed-off-by: Jay Vosburgh Fixes: b0929915e035 ("bonding: Fix RTNL: assertion failed at net/core/rtnetlink.c for ab arp monitor") Link: https://lore.kernel.org/netdev/b2fd4147-8f50-bebd-963a-1a3e8d1d9715@redhat.com/ Tested-by: Jonathan Toppins Reviewed-by: Jonathan Toppins Link: https://lore.kernel.org/r/9400.1655407960@famine Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/bonding/bond_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index cbeb69bca0bb..9c4b45341fd2 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3368,9 +3368,11 @@ static void bond_activebackup_arp_mon(struct bonding *bond) if (!rtnl_trylock()) return; - if (should_notify_peers) + if (should_notify_peers) { + bond->send_peer_notif--; call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, bond->dev); + } if (should_notify_rtnl) { bond_slave_state_notify(bond); bond_slave_link_notify(bond); -- 2.35.1