diff mbox series

[net] bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers

Message ID 9400.1655407960@famine (mailing list archive)
State Accepted
Commit 7a9214f3d88cfdb099f3896e102a306b316d8707
Delegated to: Netdev Maintainers
Headers show
Series [net] bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 22 this patch: 22
netdev/cc_maintainers warning 1 maintainers not CCed: j.vosburgh@gmail.com
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 19 this patch: 19
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 12 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Jay Vosburgh June 16, 2022, 7:32 p.m. UTC
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 <jtoppins@redhat.com>
Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com>
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/

---
 drivers/net/bonding/bond_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Jonathan Toppins June 17, 2022, 1:46 p.m. UTC | #1
On 6/16/22 15:32, Jay Vosburgh wrote:
> 	 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 <jtoppins@redhat.com>
> Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com>
> 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/

Jay, this works great. Thanks.

Tested-By: Jonathan Toppins <jtoppins@redhat.com>
Reviewed-By: Jonathan Toppins <jtoppins@redhat.com>
patchwork-bot+netdevbpf@kernel.org June 18, 2022, 3:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 16 Jun 2022 12:32:40 -0700 you wrote:
> 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 <jtoppins@redhat.com>
> Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com>
> 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/
> 
> [...]

Here is the summary with links:
  - [net] bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers
    https://git.kernel.org/netdev/net/c/7a9214f3d88c

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index f85372adf042..6ba4c83fe5fc 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3684,9 +3684,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);