From: David S. Miller Date: Mon, 27 Jan 2014 21:12:50 +0000 (-0800) Subject: Merge branch 'bonding' X-Git-Url: http://pileus.org/git/?p=~andy%2Flinux;a=commitdiff_plain;h=66dd1c077a3f3c130d1b3f0abad364f56a3ed493 Merge branch 'bonding' Veaceslav Falico says: ==================== bonding: fix locking in bond_ab_arp_prob After the latest patches, on every call of bond_ab_arp_probe() without an active slave I see the following warning: [ 7.912314] RTNL: assertion failed at net/core/dev.c (4494) ... [ 7.922495] [] dump_stack+0x51/0x72 [ 7.923714] [] netdev_master_upper_dev_get+0x6e/0x70 [ 7.924940] [] rtnl_link_fill+0x116/0x260 [ 7.926143] [] ? dump_stack+0x51/0x72 [ 7.927333] [] rtnl_fill_ifinfo+0x95c/0xb90 [ 7.928529] [] ? __kmalloc_reserve+0x3b/0xa0 [ 7.929681] [] ? __alloc_skb+0x9f/0x1e0 [ 7.930827] [] rtmsg_ifinfo+0x84/0x100 [ 7.931960] [] bond_ab_arp_probe+0x1a7/0x370 [bonding] [ 7.933133] [] bond_activebackup_arp_mon+0x1a8/0x2f0 [bonding] ... It happens because in bond_ab_arp_probe() we change the flags of a slave without holding the RTNL lock. To fix this - remove the useless curr_active_lock, RCUify it and lock RTNL while changing the slave's flags. Also, remove bond_ab_arp_probe() from under any locks in bond_ab_arp_mon(). ==================== Signed-off-by: Veaceslav Falico Signed-off-by: David S. Miller --- 66dd1c077a3f3c130d1b3f0abad364f56a3ed493