Files
twx-linux/drivers/net/ethernet
Michael Chan 032422cca8 tg3: Fix race condition in tg3_get_stats64().
[ Upstream commit f5992b72eb ]

The driver's ndo_get_stats64() method is not always called under RTNL.
So it can race with driver close or ethtool reconfigurations.  Fix the
race condition by taking tp->lock spinlock in tg3_free_consistent()
when freeing the tp->hw_stats memory block.  tg3_get_stats64() is
already taking tp->lock.

Reported-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-11 09:08:57 -07:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2017-03-18 19:09:56 +08:00
…
…
…
…
…
…
…
…
…
…