Files
linux/drivers
Xie He e00c5b9eeb 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:44:26 +02:00
..
2021-05-14 09:44:24 +02:00
2021-05-14 09:44:23 +02:00
2021-04-10 13:34:30 +02:00
2020-12-30 11:51:26 +01:00
2021-03-04 10:26:29 +01:00
2021-04-07 14:47:39 +02:00
2021-04-16 11:46:39 +02:00