tg3: tg3_timer() should grab tp->lock before checking for tp->irq_sync
authorPrashant Sreedharan <prashant@broadcom.com>
Wed, 14 Jan 2015 19:33:49 +0000 (11:33 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Jan 2015 22:05:50 +0000 (17:05 -0500)
commit4fd190a938cbb28ac9d42c5c86f5c829cc014537
tree7c6055ad7d3f9ed4e77b32bc28a81e8253e56ca2
parentb0d11b42785b70e19bc6a3122eead3f7969a7589
tg3: tg3_timer() should grab tp->lock before checking for tp->irq_sync

This is to avoid the race between tg3_timer() and the execution paths
which does not invoke tg3_timer_stop() and releases tp->lock before
calling synchronize_irq()

Reported-by: Peter Hurley <peter@hurleysoftware.com>
Tested-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Prashant Sreedharan <prashant@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c