]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
bonding: Fix RTNL: assertion failed at net/core/rtnetlink.c for ab arp monitor
authordingtianhong <dingtianhong@huawei.com>
Wed, 26 Feb 2014 03:05:23 +0000 (11:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Feb 2014 21:02:56 +0000 (16:02 -0500)
commitb0929915e0356acedf59504521c097ecada88b19
treedc6e143976647fb829bd75bdaeeffb9d8b201014
parent5e5b066535f0ee58e5de3a2db5fb56fa3cd7e3b1
bonding: Fix RTNL: assertion failed at net/core/rtnetlink.c for ab arp monitor

Veaceslav has reported and fix this problem by commit f2ebd477f141bc0
(bonding: restructure locking of bond_ab_arp_probe()). According Jay's
opinion, the current solution is not very well, because the notification
is to indicate that the interface has actually changed state in a meaningful
way, but these calls in the ab ARP monitor are internal settings of the flags
to allow the ARP monitor to search for a slave to become active when there are
no active slaves. The flag setting to active or backup is to permit the ARP
monitor's response logic to do the right thing when deciding if the test
slave (current_arp_slave) is up or not.

So the best way to fix the problem is that we should not send a notification
when the slave is in testing state, and check the state at the end of the
monitor, if the slave's state recover, avoid to send pointless notification
twice. And RTNL is really a big lock, hold it regardless the slave's state
changed or not when the current_active_slave is null will loss performance
(every 100ms), so we should hold it only when the slave's state changed and
need to notify.

I revert the old commit and add new modifications.

Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Veaceslav Falico <vfalico@redhat.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_3ad.c
drivers/net/bonding/bond_main.c
drivers/net/bonding/bonding.h