[PATCH for v4.9 LTS 64/87] tg3: Fix race condition in tg3_get_stats64().

2017-07-14 Thread Levin, Alexander (Sasha Levin)
From: Michael Chan [ Upstream commit f5992b72ebe0dde488fa8f706b887194020c66fc ] 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

[PATCH for v4.9 LTS 64/87] tg3: Fix race condition in tg3_get_stats64().

2017-07-14 Thread Levin, Alexander (Sasha Levin)
From: Michael Chan [ Upstream commit f5992b72ebe0dde488fa8f706b887194020c66fc ] 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