linux_dsm_epyc7002/drivers/net/ethernet
Zekun Shen e89df5c432 net: alx: fix race condition in alx_remove
There is a race condition exist during termination. The path is
alx_stop and then alx_remove. An alx_schedule_link_check could be called
before alx_stop by interrupt handler and invoke alx_link_check later.
Alx_stop frees the napis, and alx_remove cancels any pending works.
If any of the work is scheduled before termination and invoked before
alx_remove, a null-ptr-deref occurs because both expect alx->napis[i].

This patch fix the race condition by moving cancel_work_sync functions
before alx_free_napis inside alx_stop. Because interrupt handler can call
alx_schedule_link_check again, alx_free_irq is moved before
cancel_work_sync calls too.

Signed-off-by: Zekun Shen <bruceshenzk@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-06-15 13:20:14 -07:00
..
3com treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
8390 treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
adaptec treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
aeroflex treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
agere treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
alacritech treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
allwinner treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
alteon treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
altera treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
amazon treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
amd treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
apm
apple treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
aquantia treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
arc treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
atheros net: alx: fix race condition in alx_remove 2020-06-15 13:20:14 -07:00
aurora
broadcom treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
brocade treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
cadence net: macb: Only disable NAPI on the actual error path 2020-06-15 13:10:34 -07:00
calxeda
cavium treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
chelsio treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
cirrus treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
cisco treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
cortina treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
davicom treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
dec treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
dlink treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
emulex treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ezchip treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
faraday treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-06-13 16:27:13 -07:00
fujitsu treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
google
hisilicon treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
huawei treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
i825xx treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ibm ibmvnic: Harden device login requests 2020-06-15 13:18:13 -07:00
intel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-06-13 16:27:13 -07:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-06-13 16:27:13 -07:00
mediatek treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mellanox Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-06-13 16:27:13 -07:00
micrel treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
microchip treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
moxa treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mscc net: mscc: allow offloading timestamping operations to the PHY 2020-05-27 14:54:31 -07:00
myricom treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
natsemi treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
neterion treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
netronome treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ni net: ni: Fix use correct return type for ndo_start_xmit() 2020-05-05 11:39:43 -07:00
nvidia treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
nxp net: nxp: Fix use correct return type for ndo_start_xmit() 2020-05-05 11:17:56 -07:00
oki-semi treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
packetengines treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
pasemi treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
pensando ionic: add pcie_print_link_status 2020-06-11 18:26:19 -07:00
qlogic qlcnic: Use kobj_to_dev() instead 2020-06-15 13:05:50 -07:00
qualcomm treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
rdc treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
realtek treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
renesas treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
rocker treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
samsung treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
seeq treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sfc treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sgi treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
silan treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sis treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
smsc treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
socionext treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
stmicro treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sun treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
synopsys treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
tehuti treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-06-13 16:27:13 -07:00
toshiba treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
tundra treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
via treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
wiznet treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
xilinx net: axienet: fix spelling mistake in comment "Exteneded" -> "extended" 2020-06-15 13:02:03 -07:00
xircom treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
xscale treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
korina.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
lantiq_etop.c
lantiq_xrx200.c net: lantiq: Fix use correct return type for ndo_start_xmit() 2020-05-06 14:24:06 -07:00
Makefile