Re: [PATCH net-next] mlx4: fix use-after-free in mlx4_en_fold_software_stats()

2016-12-02 Thread David Miller
From: Eric Dumazet Date: Thu, 01 Dec 2016 05:02:06 -0800 > From: Eric Dumazet > > 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

Re: [PATCH net-next] mlx4: fix use-after-free in mlx4_en_fold_software_stats()

2016-12-01 Thread Saeed Mahameed
On Thu, Dec 1, 2016 at 3:02 PM, Eric Dumazet wrote: > From: Eric Dumazet > > 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

[PATCH net-next] mlx4: fix use-after-free in mlx4_en_fold_software_stats()

2016-12-01 Thread Eric Dumazet
From: Eric Dumazet 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_