TencentOS-kernel/drivers/net/ethernet/marvell
Pavel Andrianov 443b3c5528 net: pxa168_eth: Fix a potential data race in pxa168_eth_remove
[ Upstream commit 0571a753cb07982cc82f4a5115e0b321da89e1f3 ]

pxa168_eth_remove() firstly calls unregister_netdev(),
then cancels a timeout work. unregister_netdev() shuts down a device
interface and removes it from the kernel tables. If the timeout occurs
in parallel, the timeout work (pxa168_eth_tx_timeout_task) performs stop
and open of the device. It may lead to an inconsistent state and memory
leaks.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Pavel Andrianov <andrianov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-20 16:06:52 +08:00
..
mvpp2 net: mvpp2: fix interrupt mask/unmask skip condition 2021-05-20 16:06:47 +08:00
octeontx2 octeontx2-af: fix infinite loop in unmapping NPC counter 2021-04-12 12:53:29 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mv643xx_eth.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mvmdio.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mvneta.c net: mvneta: Remove per-cpu queue mapping for Armada 3700 2021-04-12 12:52:16 +08:00
mvneta_bm.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mvneta_bm.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pxa168_eth.c net: pxa168_eth: Fix a potential data race in pxa168_eth_remove 2021-05-20 16:06:52 +08:00
skge.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
skge.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sky2.c net: sky2: initialize return of gm_phy_read 2021-03-16 16:32:19 +08:00
sky2.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00