path: root/drivers/net/bonding/bond_3ad.c
diff options
authordingtianhong <dingtianhong@huawei.com>2014-02-26 11:05:23 +0800
committerDavid S. Miller <davem@davemloft.net>2014-02-26 16:02:56 -0500
commitb0929915e0356acedf59504521c097ecada88b19 (patch)
treedc6e143976647fb829bd75bdaeeffb9d8b201014 /drivers/net/bonding/bond_3ad.c
parent5e5b066535f0ee58e5de3a2db5fb56fa3cd7e3b1 (diff)
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>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 6826e4f61060..dcde56057fe1 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2130,13 +2130,7 @@ re_arm:
if (should_notify_rtnl && rtnl_trylock()) {
- bond_for_each_slave(bond, slave, iter) {
- if (slave->should_notify) {
- rtmsg_ifinfo(RTM_NEWLINK, slave->dev, 0,
- slave->should_notify = 0;
- }
- }
+ bond_slave_state_notify(bond);
queue_delayed_work(bond->wq, &bond->ad_work, ad_delta_in_ticks);