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

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:44:26 +02:00
..
lmc net: wan/lmc: unregister device when no matching device is found 2021-04-07 14:47:41 +02:00
.gitignore
Kconfig wan: ds26522: select CONFIG_BITREVERSE 2021-01-17 14:05:37 +01:00
Makefile net: wan: wanxl: use $(M68KCC) instead of $(M68KAS) for rebuilding firmware 2020-08-26 10:40:46 +02:00
c101.c
cosa.c cosa: Add missing kfree in error path of cosa_write 2020-11-18 19:20:28 +01:00
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:35:21 +02:00
fsl_ucc_hdlc.h
hd64570.c
hd64570.h
hd64572.c
hd64572.h
hdlc.c net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device 2020-10-29 09:57:26 +01:00
hdlc_cisco.c drivers/net/wan/hdlc: Set skb->protocol before transmitting 2020-10-07 08:01:26 +02:00
hdlc_fr.c drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values 2020-11-05 11:43:19 +01:00
hdlc_ppp.c net: hdlc_ppp: Fix issues when mod_timer is called while timer is running 2021-01-12 20:16:15 +01:00
hdlc_raw.c
hdlc_raw_eth.c net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup 2020-10-29 09:57:26 +01:00
hdlc_x25.c drivers/net/wan: lapb: Corrected the usage of skb_cow 2020-08-05 09:59:51 +02:00
hostess_sv11.c
ixp4xx_hss.c wan: ixp4xx_hss: fix compile-testing on 64-bit 2020-02-24 08:36:46 +01:00
lapbether.c net: lapbether: Prevent racing when checking whether the netif is running 2021-05-14 09:44:26 +02:00
n2.c
pc300too.c
pci200syn.c
sbni.c
sbni.h
sdla.c net: wan: sdla: Fix cast from pointer to integer of different size 2020-02-01 09:34:45 +00:00
sealevel.c
slic_ds26522.c
slic_ds26522.h
wanxl.c
wanxl.h
wanxlfw.S
wanxlfw.inc_shipped
x25_asy.c drivers/net/wan/x25_asy: Fix to make it work 2020-07-31 18:39:30 +02:00
x25_asy.h
z85230.c
z85230.h