diff options
author | Michael Chan <michael.chan@broadcom.com> | 2017-01-06 21:18:53 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-11 15:49:34 (GMT) |
commit | 1042bd47ddfbe4cbb7b91156317752fec43f2d46 (patch) | |
tree | dc5cb4349076977227ad60a48f3d2b8148ee6bab /arch | |
parent | 5f7eeee7940e256d786b883aa5b37188a05a156b (diff) | |
download | linux-1042bd47ddfbe4cbb7b91156317752fec43f2d46.tar.xz |
tg3: Fix race condition in tg3_get_stats64().
[ 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 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>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions