linux_dsm_epyc7002/drivers/net/ethernet
Firo Yang 0f90522591 enic: prevent waking up stopped tx queues over watchdog reset
Recent months, our customer reported several kernel crashes all
preceding with following message:
NETDEV WATCHDOG: eth2 (enic): transmit queue 0 timed out
Error message of one of those crashes:
BUG: unable to handle kernel paging request at ffffffffa007e090

After analyzing severl vmcores, I found that most of crashes are
caused by memory corruption. And all the corrupted memory areas
are overwritten by data of network packets. Moreover, I also found
that the tx queues were enabled over watchdog reset.

After going through the source code, I found that in enic_stop(),
the tx queues stopped by netif_tx_disable() could be woken up over
a small time window between netif_tx_disable() and the
napi_disable() by the following code path:
napi_poll->
  enic_poll_msix_wq->
     vnic_cq_service->
        enic_wq_service->
           netif_wake_subqueue(enic->netdev, q_number)->
              test_and_clear_bit(__QUEUE_STATE_DRV_XOFF, &txq->state)
In turn, upper netowrk stack could queue skb to ENIC NIC though
enic_hard_start_xmit(). And this might introduce some race condition.

Our customer comfirmed that this kind of kernel crash doesn't occur over
90 days since they applied this patch.

Signed-off-by: Firo Yang <firo.yang@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-02-12 09:43:26 -08:00
..
3com net: 3com: 3c59x: remove set but not used variable 'mii_reg1' 2020-01-08 12:40:03 -08:00
8390
adaptec
aeroflex
agere net: convert suitable network drivers to use phy_do_ioctl 2020-01-21 10:50:41 +01:00
alacritech remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
allwinner net: convert suitable drivers to use phy_do_ioctl_running 2020-01-23 10:49:30 +01:00
alteon
altera remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
amazon net: ena: ena-com.c: prevent NULL pointer dereference 2020-02-11 17:08:31 -08:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
apm drivers: net: xgene: Fix the order of the arguments of 'alloc_etherdev_mqs()' 2020-01-27 11:23:13 +01:00
apple
aquantia ioremap changes for 5.6 2020-01-27 13:03:00 -08:00
arc net: convert suitable drivers to use phy_do_ioctl_running 2020-01-23 10:49:30 +01:00
atheros Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
aurora net: convert additional drivers to use phy_do_ioctl 2020-01-22 21:16:32 +01:00
broadcom net: systemport: Avoid RBUF stuck in Wake-on-LAN mode 2020-02-06 14:28:52 +01:00
brocade Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
cadence net: macb: Limit maximum GEM TX length in TSO 2020-02-05 14:46:03 +01:00
calxeda
cavium net: thunderx: use proper interface type for RGMII 2020-02-08 15:28:09 +01:00
chelsio cxgb4: Added tls stats prints. 2020-02-06 11:26:49 +01:00
cirrus
cisco enic: prevent waking up stopped tx queues over watchdog reset 2020-02-12 09:43:26 -08:00
cortina
davicom
dec net: ethernet: dec: tulip: Fix length mask in receive length calculation 2020-02-05 14:21:31 +01:00
dlink
emulex
ezchip
faraday net: convert suitable network drivers to use phy_do_ioctl 2020-01-21 10:50:41 +01:00
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-02-08 17:15:08 -08:00
fujitsu
google Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-01-09 12:13:43 -08:00
hisilicon net: convert suitable drivers to use phy_do_ioctl_running 2020-01-23 10:49:30 +01:00
huawei
i825xx Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
ibm
intel i40e: Fix the conditional for i40e_vc_validate_vqs_bitmaps 2020-02-11 17:03:52 -08:00
marvell net: mvneta: move rx_dropped and rx_errors in per-cpu stats 2020-02-06 11:29:38 +01:00
mediatek
mellanox mlxsw: spectrum_dpipe: Add missing error path 2020-02-07 18:47:01 +01:00
micrel
microchip
moxa
mscc net: mscc: ocelot: export ANA, DEV and QSYS registers to include/soc/mscc 2020-01-05 23:22:33 -08:00
myricom net: myri10ge: use skb_list_walk_safe helper for gso segments 2020-01-08 15:19:55 -08:00
natsemi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
neterion
netronome Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
ni
nvidia
nxp net: convert suitable drivers to use phy_do_ioctl_running 2020-01-23 10:49:30 +01:00
oki-semi
packetengines
pasemi
pensando ionic: fix rxq comp packet type mask 2020-01-31 08:43:05 -08:00
qlogic qed: Fix timestamping issue for L2 unicast ptp packets. 2020-02-05 15:19:34 +01:00
qualcomm net: convert suitable drivers to use phy_do_ioctl_running 2020-01-23 10:49:30 +01:00
rdc net: convert suitable network drivers to use phy_do_ioctl 2020-01-21 10:50:41 +01:00
realtek r8169: fix performance regression related to PCIe max read request size 2020-02-06 14:17:44 +01:00
renesas net: convert suitable drivers to use phy_do_ioctl_running 2020-01-23 10:49:30 +01:00
rocker
samsung net: convert additional drivers to use phy_do_ioctl 2020-01-22 21:16:32 +01:00
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
sgi net: sgi: ioc3-eth: Remove leftover free_irq() 2020-02-05 13:53:54 +01:00
silan
sis
smsc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
socionext net: socionext: fix xdp_result initialization in netsec_process_rx 2020-01-27 11:05:42 +01:00
stmicro net: stmmac: update pci platform data to use phy_interface 2020-02-07 11:36:22 +01:00
sun net: sunvnet: use skb_list_walk_safe helper for gso segments 2020-01-08 15:19:55 -08:00
synopsys
tehuti
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
toshiba net: convert suitable drivers to use phy_do_ioctl_running 2020-01-23 10:49:30 +01:00
tundra
via via-velocity: allow nesting of ethtool_ops begin() and complete() 2020-01-06 13:54:55 -08:00
wiznet
xilinx Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
xircom
xscale net: ethernet: ixp4xx: Use parent dev for DMA pool 2020-01-12 12:59:53 -08:00
dnet.c net: convert suitable drivers to use phy_do_ioctl_running 2020-01-23 10:49:30 +01:00
dnet.h
ec_bhf.c
ethoc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
fealnx.c
jme.c
jme.h
Kconfig
korina.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
lantiq_etop.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
lantiq_xrx200.c
Makefile