linux-sg2042/drivers/net/ethernet/broadcom/bnxt
Michael Chan cb98526bf9 bnxt_en: Fix NULL pointer dereference at bnxt_free_irq().
When open fails during ethtool -L ring change, for example, the driver
may crash at bnxt_free_irq() because bp->bnapi is NULL.

If we fail to allocate all the new rings, bnxt_open_nic() will free
all the memory including bp->bnapi.  Subsequent call to bnxt_close_nic()
will try to dereference bp->bnapi in bnxt_free_irq().

Fix it by checking for !bp->bnapi in bnxt_free_irq().

Fixes: e5811b8c09 ("bnxt_en: Add IRQ remapping logic.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-11 14:42:00 -04:00
..
Makefile bnxt_en: add support for software dynamic interrupt moderation 2018-01-10 15:27:45 -05:00
bnxt.c bnxt_en: Fix NULL pointer dereference at bnxt_free_irq(). 2018-04-11 14:42:00 -04:00
bnxt.h bnxt_en: Reserve completion rings and MSIX for bnxt_re RDMA driver. 2018-03-31 23:24:20 -04:00
bnxt_dcb.c ethernet/broadcom: Use zeroing memory allocator than allocator/memset 2018-01-02 21:56:40 -05:00
bnxt_dcb.h bnxt_en: Update firmware interface to 1.9.1.15. 2018-03-31 23:24:19 -04:00
bnxt_devlink.c bnxt_en: add support for Flower based vxlan encap/decap offload 2017-10-28 00:02:45 +09:00
bnxt_devlink.h bnxt: Move generic devlink code to new file 2017-10-21 12:28:39 +01:00
bnxt_dim.c bnxt_en: add support for software dynamic interrupt moderation 2018-01-10 15:27:45 -05:00
bnxt_ethtool.c bnxt_en: Fix ethtool -x crash when device is down. 2018-04-11 14:41:59 -04:00
bnxt_ethtool.h bnxt_en: Add ETH_RESET_AP support 2017-12-01 15:29:40 -05:00
bnxt_fw_hdr.h bnxt_en: Added support for Secure Firmware Update 2016-09-19 21:32:24 -04:00
bnxt_hsi.h bnxt_en: Update firmware interface to 1.9.1.15. 2018-03-31 23:24:19 -04:00
bnxt_nvm_defs.h bnxt_en: Add support for updating flash more securely 2016-07-02 14:52:35 -04:00
bnxt_sriov.c bnxt_en: Improve valid bit checking in firmware response message. 2018-03-31 23:24:19 -04:00
bnxt_sriov.h bnxt_en: Add support for ndo_set_vf_trust 2018-03-31 23:24:19 -04:00
bnxt_tc.c bnxt_en: Ignore src port field in decap filter nodes 2018-04-11 14:41:59 -04:00
bnxt_tc.h bnxt_en: alloc tc_info{} struct only when tc flower is enabled 2017-10-28 00:02:45 +09:00
bnxt_ulp.c bnxt_en: Add ULP calls to stop and restart IRQs. 2018-03-31 23:24:20 -04:00
bnxt_ulp.h bnxt_en: Add ULP calls to stop and restart IRQs. 2018-03-31 23:24:20 -04:00
bnxt_vfr.c bnxt_en: Support max-mtu with VF-reps 2018-04-11 14:42:00 -04:00
bnxt_vfr.h bnxt_en: export a common switchdev PARENT_ID for all reps of an adapter 2018-01-17 14:48:27 -05:00
bnxt_xdp.c bnxt_en: setup xdp_rxq_info 2018-01-05 15:21:21 -08:00
bnxt_xdp.h net: bpf: rename ndo_xdp to ndo_bpf 2017-11-05 22:26:18 +09:00