linux/drivers/net/ethernet/broadcom
Zhu Yanjun 442866ff97 bnx2x: fix slowpath null crash
When "NETDEV WATCHDOG: em4 (bnx2x): transmit queue 2 timed out" occurs,
BNX2X_SP_RTNL_TX_TIMEOUT is set. In the function bnx2x_sp_rtnl_task,
bnx2x_nic_unload and bnx2x_nic_load are executed to shutdown and open
NIC. In the function bnx2x_nic_load, bnx2x_alloc_mem allocates dma
failure. The message "bnx2x: [bnx2x_alloc_mem:8399(em4)]Can't
allocate memory" pops out. The variable slowpath is set to NULL.
When shutdown the NIC, the function bnx2x_nic_unload is called. In
the function bnx2x_nic_unload, the following functions are executed.
bnx2x_chip_cleanup
    bnx2x_set_storm_rx_mode
        bnx2x_set_q_rx_mode
            bnx2x_set_q_rx_mode
                bnx2x_config_rx_mode
                    bnx2x_set_rx_mode_e2
In the function bnx2x_set_rx_mode_e2, the variable slowpath is operated.
Then the crash occurs.
To fix this crash, the variable slowpath is checked. And in the function
bnx2x_sp_rtnl_task, after dma memory allocation fails, another shutdown
and open NIC is executed.

CC: Joe Jin <joe.jin@oracle.com>
CC: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Acked-by: Ariel Elior <aelior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-14 16:16:32 +09:00
..
bnx2x bnx2x: fix slowpath null crash 2017-11-14 16:16:32 +09:00
bnxt bnxt: fix bnxt_hwrm_fw_set_time for y2038 2017-11-08 13:33:40 +09:00
genet net: bcmgenet: Avoid calling platform_device_put() twice in bcmgenet_mii_exit() 2017-11-01 11:56:14 +09:00
b44.c drivers: net: b44: use setup_timer() helper. 2017-09-21 11:44:39 -07:00
b44.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bcm63xx_enet.c ethernet/broadcom: Convert timers to use timer_setup() 2017-10-18 12:39:37 +01:00
bcm63xx_enet.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
bcmsysport.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
bcmsysport.h net: systemport: Only inspect valid switch port & queues 2017-11-02 16:49:28 +09:00
bgmac-bcma-mdio.c
bgmac-bcma.c net: bgmac: enable master mode for BCM54210E and B50212E PHYs 2017-10-12 22:59:38 -07:00
bgmac-platform.c net: ethernet: bgmac: mark expected switch fall-through 2017-11-11 18:49:26 +09:00
bgmac.c net: bgmac: Pad packets to a minimum size 2017-11-11 21:55:15 +09:00
bgmac.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bnx2_fw.h
bnx2.c drivers: net: bnx2: use setup_timer() helper. 2017-09-21 11:44:41 -07:00
bnx2.h
cnic_defs.h
cnic_if.h
cnic.c cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()' 2017-09-23 17:04:27 -07:00
cnic.h
Kconfig net: systemport: add NET_DSA dependency 2017-10-16 21:21:05 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sb1250-mac.c
tg3.c drivers: net: tg3: use setup_timer() helper. 2017-09-21 11:44:40 -07:00
tg3.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00