tg3: Fix race condition in tg3_get_stats64()
authorMichael Chan <mchan@broadcom.com>
Sun, 29 Jul 2012 19:15:44 +0000 (19:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Aug 2012 15:31:38 +0000 (08:31 -0700)
commitcbb9e89c375e167d012058c82fa69dd17ec17d4c
tree45d1c8f79e712038355016ffcffb85d078d91199
parent4593e510277fec9fbe8708b1276301ead59470f0
tg3: Fix race condition in tg3_get_stats64()

commit 0f566b208b41918053b2e67399673aaec02dde5d upstream.

Spinlock should be taken before checking for tp->hw_stats.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/tg3.c