syzbot reports two lock cycles between LAPB and lapbeth. LAPB calls
the driver's transmit callback with lapb->lock held, and a lapbeth
device on a tunnel that routes back into a lapbeth device re-enters
LAPB from there.
Patch 1 stops lapb_unregister() from holding lapb_list_lock while it
waits, patch 2 bounds lapbeth's receive queue, and patch 3 sends
frames after lapb->lock is dropped.
v3:
- cap the TX FIFO and limit each drain (Sashiko, Martin)
- add patch 2: lapbeth's rx_queue has no limit; with only patch 3
applied, a SABM/DISC flood grew slab by about 200 MB in 150 s
- fix the schedule_tx() wording and document the new API (Sashiko)
- add __releases() to the lapb_tx_unlock() prototype (Sashiko)
- Link to v2: https://lore.kernel.org/all/tenc…@qq.com/
(patches: https://lore.kernel.org/all/tenc…@qq.com/)
v2:
- fix the lock order in LAPB instead of lapbeth (Willem)
- Link to v1: https://lore.kernel.org/all/tenc…@qq.com/
---
Yu Gao (3):
net: lapb: drop lapb_list_lock before waiting for users
net: lapbether: bound the receive queue
net: lapb: transmit frames outside the protocol lock
Documentation/networking/lapb-module.rst | 31 ++++++++
drivers/net/wan/lapbether.c | 26 ++++++
include/linux/lapb.h | 8 ++
include/net/lapb.h | 13 +++
net/lapb/lapb_iface.c | 131 +++++++++++++++++++++++++++----
net/lapb/lapb_timer.c | 4 +-
6 files changed, 194 insertions(+), 19 deletions(-)
---
base-commit: 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc
change-id: 20261202-lapb-unlock-v3-163df89502b8
Best regards,
--
Yu Gao <Supe…@qq.com>
[PATCH net v3 0/3] net: lapb: don't call the driver with LAPB locks held
- From
- devn…@kernel.org (Yu Gao via B4 Relay)
- Organization
- Usenet Network
- Message-ID
- <2026…@qq.com>
- Date
- Newsgroups
- linux.kernel.netdev