diff options
| author | Eric Dumazet <[email protected]> | 2016-03-18 00:23:36 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2016-03-19 03:14:15 +0000 |
| commit | fe30937b65354c7fec244caebbdaae68e28ca797 (patch) | |
| tree | 76597e789e2eac26153f116c8dfe991f934bc96a /net/ipv6/tcp_ipv6.c | |
| parent | net: bcmgenet: fix dma api length mismatch (diff) | |
| download | kernel-fe30937b65354c7fec244caebbdaae68e28ca797.tar.gz kernel-fe30937b65354c7fec244caebbdaae68e28ca797.zip | |
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 <[email protected]>
Cc: Andy Gospodarek <[email protected]>
Cc: Jay Vosburgh <[email protected]>
Cc: Veaceslav Falico <[email protected]>
Reviewed-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
0 files changed, 0 insertions, 0 deletions
