linux-stable/drivers/net/ethernet/broadcom
Ivan Vecera 0486a063b1 tg3: prevent ifup/ifdown during PCI error recovery
The patch fixes race conditions between PCI error recovery callbacks and
potential ifup/ifdown.

First, if ifup (tg3_open) is called between tg3_io_error_detected() and
tg3_io_resume() then tp->timer is armed twice before expiry. Once during
tg3_open() and again during tg3_io_resume(). This results in BUG
at kernel/time/timer.c:945.

Second, if ifdown (tg3_close) is called between tg3_io_error_detected()
and tg3_io_resume() then tg3_napi_disable() is called twice without
a tg3_napi_enable between. Once during tg3_io_error_detected() and again
during tg3_close(). The tg3_io_resume() then hangs on rtnl_lock().

v2: Added logging messages per Prashant's request

Cc: Prashant Sreedharan <prashant@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Acked-by: Prashant Sreedharan <prashant@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02 13:02:19 -07:00
..
bnx2x net: ethernet: broadcom: bnx2x: Remove redundant #ifdef 2014-08-22 11:29:58 -07:00
genet net: bcmgenet: correctly resume adapter from Wake-on-LAN 2014-08-11 15:10:11 -07:00
b44.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
b44.h
bcm63xx_enet.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
bcm63xx_enet.h
bcmsysport.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-07-16 14:09:34 -07:00
bcmsysport.h net: systemport: add Wake-on-LAN support 2014-07-07 20:56:47 -07:00
bgmac.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
bgmac.h
bnx2.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
bnx2.h bnx2: Rebranding bnx2 driver. 2014-06-25 16:27:27 -07:00
bnx2_fw.h bnx2: Rebranding bnx2 driver. 2014-06-25 16:27:27 -07:00
cnic.c cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_defs.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_if.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
Kconfig cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
Makefile net: systemport: hook SYSTEMPORT driver in the build 2014-04-26 12:57:40 -04:00
sb1250-mac.c
tg3.c tg3: prevent ifup/ifdown during PCI error recovery 2014-09-02 13:02:19 -07:00
tg3.h tg3: prevent ifup/ifdown during PCI error recovery 2014-09-02 13:02:19 -07:00