linux-uconsole/drivers/net/wan
Xie He f72e3d81c6 net: lapbether: Prevent racing when checking whether the netif is running
[ Upstream commit 5acd0cfbfb ]

There are two "netif_running" checks in this driver. One is in
"lapbeth_xmit" and the other is in "lapbeth_rcv". They serve to make
sure that the LAPB APIs called in these functions are called before
"lapb_unregister" is called by the "ndo_stop" function.

However, these "netif_running" checks are unreliable, because it's
possible that immediately after "netif_running" returns true, "ndo_stop"
is called (which causes "lapb_unregister" to be called).

This patch adds locking to make sure "lapbeth_xmit" and "lapbeth_rcv" can
reliably check and ensure the netif is running while doing their work.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Xie He <xie.he.0141@gmail.com>
Acked-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:50:29 +02:00
..
lmc net: wan/lmc: unregister device when no matching device is found 2021-04-07 15:00:08 +02:00
.gitignore
c101.c
cosa.c
cosa.h
dlci.c
farsync.c
farsync.h
fsl_ucc_hdlc.c net: wan: fix error return code of uhdlc_init() 2021-03-30 14:31:49 +02:00
fsl_ucc_hdlc.h
hd64570.c
hd64570.h
hd64572.c
hd64572.h
hdlc.c
hdlc_cisco.c
hdlc_fr.c Revert "drivers/net/wan/hdlc_fr: Fix a double free in pvc_xmit" 2021-05-14 09:50:05 +02:00
hdlc_ppp.c
hdlc_raw.c
hdlc_raw_eth.c
hdlc_x25.c net: hdlc_x25: Prevent racing between "x25_close" and "x25_xmit"/"x25_rx" 2021-03-30 14:31:59 +02:00
hostess_sv11.c
ixp4xx_hss.c
Kconfig
lapbether.c net: lapbether: Prevent racing when checking whether the netif is running 2021-05-14 09:50:29 +02:00
Makefile
n2.c
pc300too.c
pci200syn.c
sbni.c
sbni.h
sdla.c
sealevel.c
slic_ds26522.c
slic_ds26522.h
wanxl.c
wanxl.h
wanxlfw.inc_shipped
wanxlfw.S
x25_asy.c
x25_asy.h
z85230.c
z85230.h