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 5f0c5f73e5 ("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: 5f0c5f73e5 ("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 ACPI / CPPC: remove redundant mbox_send_message() declaration 2016-02-03 01:09:52 +01:00
asm-generic ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-01-22 11:58:43 -08:00
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 [media] vb2: fix nasty vb2_thread regression 2016-02-04 09:13:46 -02:00
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 Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
soc ARM: SoC driver updates for v4.5 2016-01-20 18:42:30 -08:00
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 sunvnet: Add support for perf LDC event tracing 2016-02-07 14:13:05 -05:00
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