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
..
2015-04-11 22:28:27 -04:00
2016-03-10 19:51:30 +01:00
2015-02-20 17:35:14 -05:00
2014-12-10 15:33:16 -05:00
2015-09-21 16:03:04 -07:00
2016-03-02 20:05:27 +01:00
2016-03-08 15:16:51 -05:00
2015-12-29 19:06:20 +01:00
2016-02-11 03:54:14 -05:00
2016-03-13 22:29:07 -04:00
2016-03-10 16:24:02 -05:00
2016-02-23 20:29:40 +01:00
2016-03-10 16:24:02 -05:00
2016-02-11 03:54:14 -05:00
2015-09-17 13:20:05 +02:00
2013-07-31 17:50:01 -07:00
2016-02-08 10:30:42 -05:00
2015-12-08 21:55:49 -05:00
2014-09-18 10:54:36 +02:00
2015-03-04 00:23:23 -05:00
2015-06-28 16:55:44 -07:00
2016-02-09 04:45:49 -05:00
2014-11-10 13:27:49 -05:00
2015-07-27 01:05:24 -07:00
2016-03-18 23:14:15 -04:00
2015-11-18 16:17:38 -05:00
2016-02-24 09:04:34 +01:00
2015-09-30 13:16:44 +02:00
2016-03-13 15:01:00 -04:00
2015-02-11 14:46:37 -05:00
2015-12-08 22:02:33 -05:00
2016-02-29 17:02:33 -05:00
2015-04-09 00:02:26 -04:00
2014-02-09 17:32:50 -08:00
2013-12-06 12:37:56 -05:00
2015-03-06 21:50:02 -05:00
2016-03-01 16:07:29 -05:00
2013-12-10 21:50:00 -05:00
2013-09-20 14:49:32 -04:00
2015-09-17 17:18:37 -07:00
2013-09-20 14:49:32 -04:00
2014-02-09 17:32:49 -08:00
2014-02-09 17:32:49 -08:00
2016-03-14 16:05:31 -04:00
2016-02-16 20:21:48 -05:00
2016-03-11 15:14:26 -05:00
2015-10-08 04:27:02 -07:00
2016-03-18 19:38:46 -04:00
2013-11-07 19:28:58 -05:00
2015-09-23 15:33:15 -07:00
2015-09-09 14:19:50 -07:00
2016-03-10 16:24:02 -05:00
2015-10-07 04:27:42 -07:00
2014-02-12 07:02:11 +01:00
2014-11-12 15:01:35 -05:00
2013-09-20 14:49:33 -04:00
2014-09-30 01:02:26 -04:00
2016-02-18 11:42:19 -05:00
2015-12-16 10:58:56 -05:00
2015-08-10 14:03:54 -07:00
2015-08-31 15:17:17 -07:00
2014-11-05 16:30:03 -05:00
2016-03-14 12:19:46 -04:00
2013-09-20 14:49:33 -04:00
2014-02-06 09:34:58 +01:00
2016-01-04 20:40:41 +01:00
2015-03-23 22:12:09 -04:00
2015-12-15 23:25:20 -05:00
2015-10-03 04:32:42 -07:00
2016-02-11 03:54:14 -05:00
2015-11-02 22:46:09 -05:00
2016-02-18 11:35:51 -05:00
2016-01-15 15:07:23 -05:00
2016-02-16 20:42:54 -05:00
2016-02-11 03:54:15 -05:00
2015-12-18 14:43:38 -05:00
2015-10-20 06:08:27 -07:00
2015-12-16 00:14:12 -05:00
2016-03-13 23:55:13 -04:00
2015-11-15 17:12:37 -05:00
2016-01-29 20:31:26 -08:00
2016-02-16 20:21:48 -05:00
2016-02-18 11:31:36 -05:00
2016-03-18 19:38:46 -04:00
2016-03-07 11:53:30 +09:00
2016-03-01 17:18:44 -05:00
2016-02-18 15:27:25 -05:00
2014-11-24 04:28:49 -05:00
2016-01-29 17:13:43 +01:00
2016-03-10 14:42:03 -05:00
2016-02-26 14:22:26 -05:00
2013-09-21 14:01:38 -04:00
2014-10-14 02:18:27 +02:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-12-10 15:21:24 -05:00
2015-05-11 10:50:17 -04:00
2013-09-21 14:01:38 -04:00
2014-01-01 22:22:43 -05:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-12-10 15:21:24 -05:00
2013-09-21 14:01:38 -04:00
2014-01-03 20:56:48 -05:00
2016-02-21 22:00:28 -05:00
2016-02-24 09:04:40 +01:00
2016-03-10 19:51:28 +01:00
2013-12-06 12:37:56 -05:00
2014-09-22 16:23:15 -04:00
2015-10-23 06:26:42 -07:00
2014-11-05 23:52:33 -08:00
2013-10-01 17:06:14 -04:00
2015-12-01 15:07:59 -05:00
2015-08-10 13:46:21 -07:00
2015-12-14 12:48:58 +01:00
2013-09-21 14:01:39 -04:00
2014-08-07 20:55:21 -04:00
2015-09-30 13:16:44 +02:00
2015-12-08 22:02:33 -05:00
2013-09-21 14:01:39 -04:00
2015-09-30 13:16:44 +02:00
2013-09-21 14:01:39 -04:00
2016-02-11 03:54:14 -05:00
2016-03-11 12:04:37 -05:00
2015-08-27 14:18:48 -07:00
2016-01-10 17:28:24 -05:00
2013-09-23 01:51:08 -04:00
2016-02-11 03:54:14 -05:00
2013-09-23 01:51:08 -04:00
2014-01-21 23:17:20 -08:00
2014-12-17 11:49:55 +01:00
2015-12-22 17:03:05 -05:00
2013-09-23 01:51:08 -04:00
2016-02-16 20:42:54 -05:00
2015-10-21 19:15:20 -07:00
2016-03-03 17:38:46 -05:00
2016-02-08 10:30:42 -05:00
2014-06-02 11:00:41 -07:00
2014-10-15 07:48:18 +02:00
2016-01-19 14:44:23 -05:00
2016-02-11 03:54:14 -05:00
2013-12-19 18:51:20 -05:00
2013-09-23 01:51:09 -04:00
2016-01-10 16:50:20 -05:00
2015-03-12 22:58:12 -04:00
2016-03-14 14:55:26 -04:00
2015-07-09 15:12:20 -07:00
2014-01-19 19:53:18 -08:00
2015-10-26 22:24:22 -07:00
2016-03-11 15:14:26 -05:00
2016-02-11 03:54:14 -05:00
2015-02-04 01:34:15 -05:00
2013-07-27 22:14:06 -07:00
2016-03-11 15:14:26 -05:00
2013-09-23 16:29:40 -04:00
2014-09-05 17:35:28 -07:00
2013-09-23 16:29:41 -04:00
2015-12-11 19:22:06 -05:00