Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp653155iog; Thu, 30 Jun 2022 07:44:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1up0QKOh+4yozY2PSoC/Cucq/pClq4ALfXdAVj5AuKwlc9mCLRYn4yjo9M3R0KzisG2AYmV X-Received: by 2002:aa7:da56:0:b0:437:83a8:7dc6 with SMTP id w22-20020aa7da56000000b0043783a87dc6mr11783795eds.324.1656600269524; Thu, 30 Jun 2022 07:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656600269; cv=none; d=google.com; s=arc-20160816; b=OJL1H+XnXz+t+XdUEvnLPdIo+Ujc6tcaM1TLc31kuMz+hpcPzNvIJg/OLsPuhIxC85 U5S3e1j2SuQwiPhrRNgh3mlPrSi78LGIm1614ZVCawhjc8kwaoVmTjHO1wPPuPV52IIT 46N4G3MsgvQWDJswENcWnjt5q9b6AhT+3LyBaCF6WMdN1ygWInERrXmABTKLjyLp4yNA rHQpj+9hAjxgruFlhkPhFwPuvXtZ5JlwsleYpXOrurf0iz8hAtwfYGnI0h/8yqUAtj2R mvTAfEeRHb5mqu8O0OitUPtpdAdtAWBkVoiVFk3206i1oxgx5c/9oI7ZDu3yyQx/8h8Q crYg== 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=BhWcwT1DhrtSsJtzW6F0mRuQSdphdJBN9FSK3eMJf14=; b=e5pBxyIoOWfHRoQ1sjiTic6Ib7CtfAULRoj8VBmPx3y6mPBiTyHH4GXwaY6zrK/HLl gC/ErAxVjGl8pKNV7k1IeD3dyD9dXSiUbKsT5sN3V7j5CKytYiS5tGaqKXE+xTqQfgeC CoeeXi7wAkOeRbtJBAIMI7WQqomg9QX0GzXGPkEiVBfRaOEVwnK+eJ346zzKiiv+g6K2 spP2LP/HQNi9Q8ylPCLKmHh1+zFR7dAgTWxwp/WjewufFFXVLYdYTLtX29Z7Nn+OdHAZ Q9pwycYPyyJn/m4tHYozlLJ5oQHlN58ktJ/Yj3Tjhdwz/IqVGQwkRcgeF137Ss4Qiagv +5+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fPK4kYYB; 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 dz15-20020a0564021d4f00b00435b3f810c6si8284531edb.344.2022.06.30.07.44.04; Thu, 30 Jun 2022 07:44:29 -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=fPK4kYYB; 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 S236124AbiF3ODe (ORCPT + 99 others); Thu, 30 Jun 2022 10:03:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236502AbiF3OCd (ORCPT ); Thu, 30 Jun 2022 10:02:33 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32AE368A00; Thu, 30 Jun 2022 06:52:56 -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 ams.source.kernel.org (Postfix) with ESMTPS id 645F7B82AF5; Thu, 30 Jun 2022 13:52:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B40EAC3411E; Thu, 30 Jun 2022 13:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656597169; bh=oyPtyRGppegOs2HUPer1Je0Qz2tbUeLP7TpNwUb2JSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fPK4kYYBsn5stPQ1Cpx8jNVPWpFj/hiFQBjuAnfJhp3R7dTrsKfz4TELJN1hdZrle v2YH6Rebz/Q4htsY79yBNABy5B1RO6RIQW56KPUq4SeVyreMJz4tnpd+o8oPnOAY5V 2iLxLJSUUNf8uTA8jmepfMfWTk5OAMtyIhYFsRhA= 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 4.19 12/49] bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers Date: Thu, 30 Jun 2022 15:46:25 +0200 Message-Id: <20220630133234.264577719@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220630133233.910803744@linuxfoundation.org> References: <20220630133233.910803744@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 2d70cdd26f89..cab5c1cc9fe9 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3069,9 +3069,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