linux/drivers/net
dingtianhong 4cb4f97b7e bonding: rebuild the lock use for bond_mii_monitor()
The bond_mii_monitor() still use bond lock to protect bond slave list,
it is no effect, I have 2 way to fix the problem, move the RTNL to the
top of the function, or add RCU to protect the bond slave list,
according to the Jay Vosburgh's opinion, 10 times one second is a
truely big performance loss if use RTNL to protect the whole monitor,
so I would take the advice and use RCU to protect the bond slave list.

The bond_has_slave() will not protect by anything, there will no things
happen if the slave list is be changed, unless the bond was free, but
it will not happened before the monitor, the bond will closed before
be freed.

The peers notify for the bond will calling curr_active_slave, so
derefence the slave to make sure we will accessing the same slave
if the curr_active_slave changed, as the rcu dereference need in
read-side critical sector and bond_change_active_slave() will call
it with no RCU hold,  so add peer notify in rcu_read_lock which
will be nested in monitor.

Suggested-by: Jay Vosburgh <fubar@us.ibm.com>
Suggested-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-14 01:58:01 -05:00
..
appletalk
arcnet
bonding bonding: rebuild the lock use for bond_mii_monitor() 2013-12-14 01:58:01 -05:00
caif virtio: use size-based config accessors. 2013-10-17 10:55:37 +10:30
can can: flexcan: use correct clock as base for bit rate calculation 2013-11-26 15:39:47 +01:00
cris
dsa
ethernet Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next 2013-12-14 01:11:22 -05:00
fddi net: fddi: remove unnecessary pci_set_drvdata() 2013-12-10 22:31:32 -05:00
hamradio drivers/net/*: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
hippi net: hippi: remove unnecessary pci_set_drvdata() 2013-12-10 22:31:32 -05:00
hyperv drivers/net/*: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
ieee802154 net: ieee802154: remove unnecessary spi_set_drvdata() 2013-12-10 22:31:32 -05:00
irda irda: vlsi_ir: remove unnecessary pci_set_drvdata() 2013-12-09 18:09:28 -05:00
phy net: phy: spi_ks8995: remove unnecessary spi_set_drvdata() 2013-12-10 22:31:32 -05:00
plip net:drivers/net: Miscellaneous conversions to ETH_ALEN 2013-10-02 17:04:45 -04:00
ppp drivers/net/*: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
slip slip/slcan: added locking in wakeup function 2013-09-20 15:38:26 -04:00
team team: fix master carrier set when user linkup is enabled 2013-11-29 16:34:33 -05:00
usb usb: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
vmxnet3 net: vmxnet3: remove unnecessary pci_set_drvdata() 2013-12-10 22:31:32 -05:00
wan wan: wanxl: remove unnecessary pci_set_drvdata() 2013-12-09 18:09:29 -05:00
wimax wimax: Remove extern from function prototypes 2013-09-24 16:46:22 -07:00
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2013-12-06 09:50:45 -05:00
xen-netback xen-netback: improve guest-receive-side flow control 2013-12-09 20:33:12 -05:00
dummy.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
eql.c
ifb.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
Kconfig
LICENSE.SRC
loopback.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
macvlan.c macvlan: Remove custom recieve and forward handlers 2013-12-12 13:38:39 -05:00
macvtap.c macvlan: Remove custom recieve and forward handlers 2013-12-12 13:38:39 -05:00
Makefile
mdio.c
mii.c
netconsole.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-11-04 13:48:30 -05:00
nlmon.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c Revert "tun: remove useless codes in tun_chr_aio_read() and tun_recvmsg()" 2013-12-10 22:05:45 -05:00
veth.c Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-14 16:30:30 +09:00
virtio_net.c virtio_net: spelling fixes 2013-12-10 22:28:06 -05:00
vxlan.c vxlan: leave multicast group when vxlan device down 2013-12-11 14:21:26 -05:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-11-19 15:50:47 -08:00