Netdev List
 help / color / mirror / Atom feed
* [PATCH net v3 0/3] net: lapb: don't call the driver with LAPB locks held
@ 2026-12-01 17:18 Yu Gao via B4 Relay
  2026-12-01 17:18 ` [PATCH net v3 1/3] net: lapb: drop lapb_list_lock before waiting for users Yu Gao via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yu Gao via B4 Relay @ 2026-12-01 17:18 UTC (permalink / raw)
  To: Martin Schiller, netdev
  Cc: Hillf Danton, David S. Miller, Simon Horman, Xie He, Andrew Lunn,
	Eric Dumazet, Jonathan Corbet, Willem de Bruijn,
	syzbot+8328573e4d0514392471, linux-doc, Jakub Kicinski,
	Paolo Abeni, linux-x25, syzbot+059a2795ad4cff2a2695

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/tencent_3E0B7A77095DABF2713232EE51F7A334BF07@qq.com/
  (patches: https://lore.kernel.org/all/tencent_BFB53B9AEE4AF90B99337798FB43DACAC506@qq.com/)

v2:
- fix the lock order in LAPB instead of lapbeth (Willem)
- Link to v1: https://lore.kernel.org/all/tencent_AD34C10B65771ADD86725F3221EE31778507@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 <SuperSkidder@qq.com>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-12-05 17:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 17:18 [PATCH net v3 0/3] net: lapb: don't call the driver with LAPB locks held Yu Gao via B4 Relay
2026-12-01 17:18 ` [PATCH net v3 1/3] net: lapb: drop lapb_list_lock before waiting for users Yu Gao via B4 Relay
2026-12-01 17:18 ` [PATCH net v3 2/3] net: lapbether: bound the receive queue Yu Gao via B4 Relay
2026-12-05 17:39   ` netdev-bot+sashiko
2026-12-01 17:18 ` [PATCH net v3 3/3] net: lapb: transmit frames outside the protocol lock Yu Gao via B4 Relay
2026-12-05 17:39   ` netdev-bot+sashiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox