twx-linux/include
Eric Dumazet fe30937b65 bonding: fix bond_get_stats()
bond_get_stats() can be called from rtnetlink (with RTNL held)
or from /proc/net/dev seq handler (with RCU held)

The logic added in commit 5f0c5f73e5ef ("bonding: make global bonding
stats more reliable") kind of assumed only one cpu could run there.

If multiple threads are reading /proc/net/dev, stats can be really
messed up after a while.

A second problem is that some fields are 32bit, so we need to properly
handle the wrap around problem.

Given that RTNL is not always held, we need to use
bond_for_each_slave_rcu().

Fixes: 5f0c5f73e5ef ("bonding: make global bonding stats more reliable")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Andy Gospodarek <gospo@cumulusnetworks.com>
Cc: Jay Vosburgh <j.vosburgh@gmail.com>
Cc: Veaceslav Falico <vfalico@gmail.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-18 23:14:15 -04:00
..
acpi
asm-generic ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
clocksource
crypto
drm drm/atomic: Allow for holes in connector state, v2. 2016-02-19 13:24:03 +10:00
dt-bindings clk: rockchip: add clock-id for rk3036 emac pll source clock 2016-03-16 19:28:02 -04:00
keys
kvm
linux phy: fixed: Fix removal of phys. 2016-03-14 15:43:11 -04:00
math-emu
media
memory
misc
net bonding: fix bond_get_stats() 2016-03-18 23:14:15 -04:00
pcmcia
ras
rdma net: rdma: use __ethtool_get_ksettings 2016-02-25 22:06:46 -05:00
rxrpc rxrpc: Be more selective about the types of received packets we accept 2016-03-04 15:56:06 +00:00
scsi
soc
sound ALSA: hda - Loop interrupt handling until really cleared 2016-02-26 08:50:31 +01:00
target target/transport: add flag to indicate CPU Affinity is observed 2016-02-10 23:08:55 -08:00
trace
uapi net: fix a comment typo 2016-03-18 19:40:27 -04:00
video
xen xen-netback: re-import canonical netif header 2016-03-13 22:08:01 -04:00
Kbuild