diff options
| author | Eric Dumazet <[email protected]> | 2016-12-01 13:02:06 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2016-12-02 18:33:32 +0000 |
| commit | 7f7bf1606fa8fa0e3aecdeac0ba8005f2a0fbdef (patch) | |
| tree | 9e260417519b43992f353d24aeb03c3b278dc00c /lib/debugobjects.c | |
| parent | net: thunderx: Fix transmit queue timeout issue (diff) | |
| download | kernel-7f7bf1606fa8fa0e3aecdeac0ba8005f2a0fbdef.tar.gz kernel-7f7bf1606fa8fa0e3aecdeac0ba8005f2a0fbdef.zip | |
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 <[email protected]>
Reported-and-bisected-by: Jesper Dangaard Brouer <[email protected]>
Tested-by: Jesper Dangaard Brouer <[email protected]>
Cc: Tariq Toukan <[email protected]>
Cc: Saeed Mahameed <[email protected]>
Acked-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions
