linux/drivers/net/ethernet/broadcom/bnxt
Michael Chan f9b76ebd49 bnxt_en: Fix race conditions in .ndo_get_stats64().
.ndo_get_stats64() may not be protected by RTNL and can race with
.ndo_stop() or other ethtool operations that can free the statistics
memory.  Fix it by setting a new flag BNXT_STATE_READ_STATS and then
proceeding to read statistics memory only if the state is OPEN.  The
close path that frees the memory clears the OPEN state and then waits
for the BNXT_STATE_READ_STATS to clear before proceeding to free the
statistics memory.

Fixes: c0c050c58d ("bnxt_en: New Broadcom ethernet driver.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-11 10:32:11 -07:00
..
bnxt_dcb.c bnxt_en: Check status of firmware DCBX agent before setting DCB_CAP_DCBX_HOST. 2017-05-17 15:12:49 -04:00
bnxt_dcb.h bnxt_en: Pass DCB RoCE app priority to firmware. 2017-04-24 13:54:46 -04:00
bnxt_ethtool.c bnxt_en: Optimize doorbell write operations for newer chips. 2017-05-30 18:14:07 -04:00
bnxt_ethtool.h bnxt_en: Add basic ethtool -t selftest support. 2017-04-05 06:24:26 -07: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 spec to 1.7.6.2. 2017-04-05 06:24:26 -07: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: Fix VF attributes reporting. 2017-04-24 13:54:46 -04:00
bnxt_sriov.h bnxt_en: Update firmware interface spec to 1.7.6.2. 2017-04-05 06:24:26 -07:00
bnxt_ulp.c bnxt_en: Add a callback to inform RDMA driver during PCI shutdown. 2017-05-30 18:14:07 -04:00
bnxt_ulp.h bnxt_en: Add a callback to inform RDMA driver during PCI shutdown. 2017-05-30 18:14:07 -04:00
bnxt_xdp.c bpf: bnxt: Report bpf_prog ID during XDP_QUERY_PROG 2017-06-16 11:58:36 -04:00
bnxt_xdp.h bnxt_en: Add ethtool mac loopback self test. 2017-04-05 06:24:26 -07:00
bnxt.c bnxt_en: Fix race conditions in .ndo_get_stats64(). 2017-07-11 10:32:11 -07:00
bnxt.h bnxt_en: Fix race conditions in .ndo_get_stats64(). 2017-07-11 10:32:11 -07:00
Makefile bnxt_en: Add basic XDP support. 2017-02-07 13:31:00 -05:00