summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
diff options
context:
space:
mode:
authorMichael Chan2017-07-11 19:05:34 +0200
committerDavid S. Miller2017-07-11 19:32:11 +0200
commitf9b76ebd49f97458857568918c305a17fa7c6567 (patch)
tree993131304daeabca1f46a01b902ab4224280ac35 /drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
parentnet/mlx5: IPSec, fix 64-bit division correctly (diff)
downloadkernel-qcow2-linux-f9b76ebd49f97458857568918c305a17fa7c6567.tar.gz
kernel-qcow2-linux-f9b76ebd49f97458857568918c305a17fa7c6567.tar.xz
kernel-qcow2-linux-f9b76ebd49f97458857568918c305a17fa7c6567.zip
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: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c')
0 files changed, 0 insertions, 0 deletions