Eric Dumazet
7f7bf1606f
mlx4: fix use-after-free in mlx4_en_fold_software_stats()
...
My recent commit to get more precise rx/tx counters in ndo_get_stats64()
can lead to crashes at device dismantle, as Jesper found out.
We must prevent mlx4_en_fold_software_stats() trying to access
tx/rx rings if they are deleted.
Fix this by adding a test against priv->port_up in
mlx4_en_fold_software_stats()
Calling mlx4_en_fold_software_stats() from mlx4_en_stop_port()
allows us to eventually broadcast the latest/current counters to
rtnetlink monitors.
Fixes: 40931b85113d ("mlx4: give precise rx/tx bytes/packets counters")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-and-bisected-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
Cc: Saeed Mahameed <saeedm@dev.mellanox.co.il>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-02 13:33:32 -05:00
..
2016-11-26 23:42:21 -05:00
2016-10-24 19:37:48 +02:00
2016-10-25 11:43:07 -04:00
2016-10-31 15:32:12 -04:00
2016-10-06 17:03:41 +02:00
2016-11-15 22:34:25 -05:00
2016-11-12 08:27:07 -07:00
2016-10-20 10:14:49 +02:00
2016-10-17 13:46:09 -07:00
2016-11-22 13:27:16 -05:00
2016-11-16 11:10:58 -08:00
2016-10-20 21:58:58 +02:00
2016-10-29 01:29:17 +02:00
2016-10-15 09:26:12 -07:00
2016-11-22 13:27:16 -05:00
2016-11-16 09:00:38 -08:00
2016-10-11 00:01:20 +02:00
2016-11-17 16:09:23 +05:30
2016-10-11 18:12:22 -07:00
2016-10-04 12:06:26 -07:00
2016-10-26 16:04:29 +09:00
2016-11-15 10:54:36 -05:00
2016-10-19 14:49:44 +02:00
2016-11-16 20:46:32 +01:00
2016-11-25 14:21:26 +10:00
2016-11-23 17:54:58 +01:00
2016-10-20 14:51:10 -04:00
2016-11-01 09:07:13 -06:00
2016-10-24 06:05:13 -07:00
2016-11-25 23:23:25 +01:00
2016-10-07 18:46:30 -07:00
2016-11-13 10:08:32 +01:00
2016-11-22 13:27:16 -05:00
2016-11-05 11:26:11 -07:00
2016-11-08 15:08:26 +01:00
2016-10-27 18:43:43 -07:00
2016-10-21 21:40:29 +02:00
2016-10-13 09:36:57 -04:00
2016-09-20 10:22:10 +02:00
2016-10-07 14:42:05 -07:00
2016-09-20 20:57:12 +10:00
2016-11-14 22:07:38 +01:00
2016-09-27 12:33:47 +02:00
2016-11-05 11:34:07 -07:00
2016-11-26 23:42:21 -05:00
2016-10-07 21:23:40 -07:00
2016-10-17 15:43:05 +02:00
2016-10-20 14:51:10 -04:00
2016-11-25 11:10:55 +00:00
2016-11-15 10:54:36 -05:00
2016-11-21 11:08:28 +01:00
2016-11-05 10:52:29 -07:00
2016-12-02 13:33:32 -05:00
2016-10-31 10:25:22 -06:00
2016-11-13 16:48:30 -05:00
2016-10-27 16:16:21 -07:00
2016-11-16 12:39:57 -07:00
2016-10-07 21:23:40 -07:00
2016-11-17 12:05:04 -05:00
2016-10-10 20:16:43 -07:00
2016-11-14 08:39:56 -08:00
2016-11-11 08:45:08 -08:00
2016-10-17 15:50:07 +01:00
2016-11-17 16:25:40 +01:00
2016-11-07 10:31:33 +01:00
2016-11-11 17:02:01 -08:00
2016-10-06 18:21:15 -07:00
2016-10-11 15:06:32 -07:00
2016-09-20 20:57:12 +10:00
2016-11-09 21:19:53 -05:00
2016-10-19 08:11:43 -07:00
2016-10-28 18:22:40 +01:00
2016-10-06 17:03:49 -07:00
2016-10-22 18:31:42 +09:00
2016-11-04 23:11:39 +01:00
2016-10-30 12:42:58 -04:00
2016-11-26 23:42:21 -05:00
2016-10-14 11:07:42 -07:00
2016-10-29 12:51:55 -06:00
2016-09-27 12:43:34 +02:00
2016-11-17 08:49:04 +02:00
2016-11-15 10:54:36 -05:00
2016-11-18 14:04:29 -05:00
2016-11-26 23:42:21 -05:00
2016-10-30 12:42:58 -04:00
2016-11-26 23:42:21 -05:00
2016-11-01 09:04:04 -06:00
2016-10-26 13:49:29 -06:00
2016-11-03 12:20:14 +02:00
2016-10-19 08:11:43 -07:00
2016-10-31 00:40:08 +02:00
2016-10-28 08:25:18 -04:00
2016-11-25 22:24:07 +01:00
2016-10-24 19:52:24 -07:00
2016-10-23 15:56:23 -07:00