Article View: linux.kernel.netdev
Article #25382[PATCH net v3 0/3] net: lapb: don't call the driver with LAPB locks held
From: Yu Gao via B4 Relay
Date: Tue, 01 Dec 2026 17:18
Date: Tue, 01 Dec 2026 17:18
43 lines
12619 bytes
12619 bytes
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>
Technical Details
Message-ID:
<20261202-lapb-unlock-v3-v3-0-65b6ce65141b@qq.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375235-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375235-linux-kernel-netdev=dewy.ru From: devnull+SuperSkidder.qq.com@kernel.org (Yu Gao via B4 Relay) Newsgroups: linux.kernel.netdev Subject: [PATCH net v3 0/3] net: lapb: don't call the driver with LAPB locks held Date: Wed, 02 Dec 2026 01:18:15 +0800 Organization: Usenet Network Message-ID: <20261202-lapb-unlock-v3-v3-0-65b6ce65141b@qq.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1775901"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:phNO2TJqMKFqAjCbO6oT2kTBueo= sha256:EYMVjrcsTefdBM5Mb1psbMNFNE81P1lP6dZJ9PpCFNI= sha1:tPKn/AbRYbkPea31jnWtrD3W6Xg= sha256:mnmG7m8gqupOUZrVisihEd5U26ngpB3zRloQu5+onOw= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 7B6B2117433; Tue, 1 Dec 2026 20:18:55 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7kFpVw1nm11M; Tue, 1 Dec 2026 20:18:52 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-375235-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 00AAF117432; Tue, 1 Dec 2026 20:18:43 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 29C0A24E22; Tue, 1 Dec 2026 17:18:40 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796145514; b=EhxKI8mtwS8zj+FNjMmxc8jUKKVYYsoKvFTCl+T81osV+mQvW3rwe2z6xXxVbPiIXEkI ZbIJwmJIlAnH6rc/d1pc2oWKaSZ5e+kekOt0Xkh5UEHaKP1sbujz0LMGW1rn24L8iIRNj gwCd9eyAX6oB+R9e57LuXgF03BlkP6X8EfUT5lbRDEmqPSXVTUTffQuOa33OTVvSuED02 eEDAon6QGnmqfF819b5M/x5u5bsDEKAr1Yk7X1BblLKGXf19bcO4EknuxZQuaLtQZMgFj RtBuNpAuTNqoW0YqcDP++BOK5FcQJX2mwME20WbZfzqOKJLkadaj8DxIg3JmK7xPw1A== X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796145514; h=X-Original-To:Received:Received:DKIM-Signature:Received:From:Subject: Date:Message-Id:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=UgsUGPCuy0vYryiHZ1zA+dhdbkb7HQaMBVOUWtv3RHc=; b=Qj2DydnmXVXtYP3CAnXFgIWOuFe6ydNPHqWa4r5UXnHR5uuA4UXLjV0tZWVuT+WALj4i dExwm1jlXnxOcd0JsRRNjbJskWfthJYtAfSo3t/GQbt6Ob9JXqQSABpwsS0wZHm4HaVyZ HqrZEODLMV9xBP9l9Ve4OpkFdtnlYoqsQYFFzZzs938AEu/8+GZM7pgrTQpY2tiDkWi02 zkxolq3+tG55SuuTcItcDoeI/FcLLVDbogwiApuauzZ6IKUfZN8BrXdbuV86GbH1od/jt WzRiTsLpQ7z4UjoIRkJjnY3PpuI8Yz6x3MV/vJs9fGmT47ehS+VBOwEPisZ8Irwkm8Q== X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Bseoetwk; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E5F8606A68B; Tue, 1 Dec 2026 17:18:34 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Bseoetwk X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796145508; b=oa6pd0rWrIts0CcUo3rheAKORXXcLvofvknDweJ6y4cDF0Kn2Mwue+Ovb0ZU7007HD29 be/mpYI0Ny7OgF8UFFxgQyRt0HbKBzn/IE6PGkl8x/tAqeGyr7GdWDwnF42fe1eS8ZjSe z4tk41pHQ+wDwZYQhImif8uodSQwKD6zsuWHeZdG+XBW0TWRmoe9bws2J+v/rlAPaiMwf Zkq15AVArJDI9dhc0o7iplcmRKNkVqmKf+zFeD99V0zOpvbZSBnNh2zZfTynYKx+aTRXu hswNiPYwwIct0XAvzd/ZN1mIRWtqGK48CyfkQZ0ECFn8HdwMaWwchcpNb0vOUXiyRMg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796145508; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; bh=UgsUGPCuy0vYryiHZ1zA+dhdbkb7HQaMBVOUWtv3RHc=; b=BLLh1rxp41FvSQydceYaBLpKo0yIkcC+ePc+G7/GySI8ZRG4D0o6Itxf+98y3VWo1Cn6 DhbS6Lux5V3XtftsHjBOEhwY/ReCVJThIt1MAaOcq8whm07KFzzN2DQjl4aHH4r9qHkKf dNEPoDmG3zONt2a5QEd9rpnKUhHFIj5PiDVnlcpb5VQAsfOCu6QV2NjiFDquHEZDK9p+K jzso6s/SQgmw9SbmfR2TwXU0prEpu3i+bX9Fn3fWPtlEv7S34JgaPPJFhD0Bpq+nP0+CY f5uzydfGsqSgIEneAkQaqvlcmQC9XVCVpW9vsgVpBP91L7cdvWxGrVMoBbl0Dv4ijzQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Bseoetwk; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9633D606A31A; Tue, 1 Dec 2026 17:18:28 +0000 (UTC) X-Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 X-ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796145508; b=vLY0Sc56daz4Y6c1J7hWIR9aDW6IrSAyeKqb8nIm0rBNH1rszMvgJ62Skq5+ZPLCq1DT LAQBwNSa+47JS1EdO/PpTiskwa1/WUV6XrFUjcjWxvK0LWiQRGGe2TzAefXRNcIpaMIEV VgStKTGp9dalXD3eVhjfbUGkEVO7LURFZjqhYPCRzQ0f/khe17jP7Sy1DLorS+MfBNaX2 M+0rKiXcucehFo0Metytt1eP2THaqYjnjJ+HZBhrXpW44bFXZmzxfTxY6W36c0UD8PlVN QZ+xfybUPzVCehRWXPDpFUWKHS97vIxv2D7pkf5NiJDQWcJ3dwn0tP6oUBJX6pGVmMQ== X-ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796145508; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=UgsUGPCuy0vYryiHZ1zA+dhdbkb7HQaMBVOUWtv3RHc=; b=JQdf4CZic9nfPgEEqUsk9qrpoXAIUJGlpN3XDtdjirGCv8EBtkvu0wzOzpxRrUeMvCB+ YKRMBxLT20ro9p2qG9eje0wGi4nb4U8G8OzRCmgQan7C2wYr2+4Sz2XAZRI1o2Z/zyCLd gOdocJhnv2DCKxG7ZRYBscTQ3VLC8t8u92Y8blIDFrHT8l7STRHbyvbIYTwoMFfrLOnmu NqG7wrumxM3fgd3JffEEcJ79PnvbdxYLQyzlH9C+/inb3VDSBm0FOgcOsRNQv7M74jkMU bT59yo+6QyBzWBq4gS13A8pj0o9QVIJz5M7dCZP+NZZKQVtH0CSaHjSSw1L/GWvU6Iw== X-ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 X-Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 4D5C11F00899; Tue, 1 Dec 2026 17:18:23 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796145508; bh=UgsUGPCuy0vYryiHZ1zA+dhdbkb7HQaMBVOUWtv3RHc=; h=From:Subject:Date:To:Cc:Reply-To; b=BseoetwkrmVpTNgfB6HL1F+ygUkTdfmTZiOmqyMF5aZFti/0b7OJhfN4+UG/N5lPW YAMV6OG7SuDP4TO794IC+Vub7USn+wQoN+0RdZyn3as2AG404VrobzCoR9qZPYQxIG 4w2hur7ArpVmsyBEdERxqLHzqFZJhY+ohht96EL+U6mKbpGKaECRlEy/vHHOQV8qYf gHkgr+L2KLzouV9SFreoUdDVy0hcnujHAASzFiUlDtPKTIQsfDmpTIICB48KQe13/Q 6nQ3afZC+cZAG/eAZsCLst301z6wurdb47khq9TSXR/xRuGdNccCc1OkQNWxch4bpE zlh0jGmIkFLbg== X-Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id CA38C4EEE1; Tue, 1 Dec 2026 17:18:22 +0000 (UTC) X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-B4-Tracking: v=1; b=H4sIAAAAAAAA/yWMwQ6CMBBEf4Xs2U2gjQT9FeOhLYtUcSG7hZgQ/ t1WL5O8yczbQUkiKVyrHYS2qHHmDPZUQRgdPwhjnxlMbdomB05u8bjyNIcXbhab1vZDdznXxne QT4vQED8/4Q2YEtz/pa7+SSEVVZl5p4ReHIexVG+niQSO4wvRhNz3kAAAAA== X-Change-ID: 20261202-lapb-unlock-v3-163df89502b8 X-Cc: Hillf Danton <hdanton@sina.com>, "David S. Miller" <davem@davemloft.net>, Simon Horman <horms@kernel.org>, Xie He <xie.he.0141@gmail.com>, Andrew Lunn <andrew+netdev@lunn.ch>, Eric Dumazet <edumazet@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Willem de Bruijn <willemb@google.com>, syzbot+8328573e4d0514392471@syzkaller.appspotmail.com, linux-doc@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, linux-x25@vger.kernel.org, syzbot+059a2795ad4cff2a2695@syzkaller.appspotmail.com X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796145501; l=1840; i=SuperSkidder@qq.com; s=20261125; h=from:subject:message-id; bh=inLjHHJd/iLkHv67GqEdQbuicgWBvDTPNq696yANwxA=; b=ouXyNeH3gvJxcqWH2Rmf1MX0HzezGKPdnu3PKjhufLd+WFNGZjIXgKSmPNk2REiw7kj1Y0IhZ wDN+j5Hyuv5DQyu31t8g12Ug409UrPDxqOVbBiO81xVBztzRAhNHZgY X-Developer-Key: i=SuperSkidder@qq.com; a=ed25519; pk=HtDU+fHDhp/b7yb+opRFNaSEtNxybJRlJ2dM9BnxMwU= X-Endpoint-Received: by B4 Relay for SuperSkidder@qq.com/20261125 with auth_id=1634 X-Original-From: Yu Gao <SuperSkidder@qq.com> X-Reply-To: SuperSkidder@qq.com