Article View: linux.kernel.netdev
Article #5912[PATCH net v2 0/2] net: usb: cdc_ncm/cdc_mbim: fix netpoll lockup in tx_fixup
From: Nicolai Buchwitz
Date: Wed, 21 Oct 2026 07:56
Date: Wed, 21 Oct 2026 07:56
30 lines
9570 bytes
9570 bytes
Mikkel reported lockups with netconsole on a cdc_ncm device. Further
analysis showed that netpoll calls ndo_start_xmit() with IRQs off but
BHs on while holding the txq lock, and the spin_unlock_bh() in the
tx_fixup paths runs pending softirqs. A transmit from one of them then
spins on that txq lock.
Patch 1 fixes cdc_ncm. Mikkel reproduced the lockup and tested the fix.
Patch 2 fixes the same code in cdc_mbim and is untested.
Changes in v2:
- Reverse xmas in patch 1
- Link to v1: https://lore.kernel.org/r/20261020-cdc-ncm-netpoll-v1-0-682184384b49@tipi-net.de
Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
Nicolai Buchwitz (2):
net: usb: cdc_ncm: don't enable BHs in tx_fixup under netpoll
net: usb: cdc_mbim: don't enable BHs in tx_fixup under netpoll
drivers/net/usb/cdc_mbim.c | 6 ++++--
drivers/net/usb/cdc_ncm.c | 10 +++++++---
2 files changed, 11 insertions(+), 5 deletions(-)
---
base-commit: 044ad3c90d9d2df2c5cb3325ae17b4e9603a311f
change-id: 20261020-cdc-ncm-netpoll-d7a7f69dd2cc
Best regards,
--
Nicolai Buchwitz <nb@tipi-net.de>
Technical Details
Message-ID:
<20261021-cdc-ncm-netpoll-v2-0-8818965bbb69@tipi-net.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349875-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349875-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: [PATCH net v2 0/2] net: usb: cdc_ncm/cdc_mbim: fix netpoll lockup in tx_fixup Date: Wed, 21 Oct 2026 09:56:17 +0200 Organization: Usenet Network Message-ID: <20261021-cdc-ncm-netpoll-v2-0-8818965bbb69@tipi-net.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="4068989"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:YTQ/jxSvCZKgtTlpoX9SbTqhBX4= sha256:doO+nuuignuKBJ45MkXwPyPE6TZQE84e7G3oBYjcyo4= sha1:MztXi2g5/xYbp8G9PXScZWyQnrE= sha256:rVu22sM/qZ5vQrZtcFeYzFrIF9Oo1dxVJ+FykDoYhVc= 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 D230C110F6C; Wed, 21 Oct 2026 11:02:43 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.049 X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=tipi-net.de 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 dJWAMfdgR91G; Wed, 21 Oct 2026 11:02:40 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-349875-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id B4F73110F66; Wed, 21 Oct 2026 11:02:30 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id CD34E6421F; Wed, 21 Oct 2026 07:56:41 +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=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1792569396; b=K52KbMnr/xjwBoU42F78Nxv8MT8IHXi+30QXFwjiN1dmTov6woQsV/8Zjjq/BVv1Uwq/ bGO7r3RUiPPGR6xytGUUvylP6CAwDoiA3kz3TukWa57uHMborrn1bKgFSBaN3LFN+oGe1 8uvHdKdbUlHSjZbiJXXDSXuNIIrrowzuZZx9nxEtnz5PDi63nskHQCxKtZzosssM1LSTT 2AE6Mq0y020+cEOoI/iypDoFI1sxsGdurbWjfwCsQsU7zKLCtI2tzJwRc3Aqldik8vYmp WXi5i52rNqsDMZn+RQrvQNmUZKKCd616YUVvLtdxxnR7NK7kuSPELTcn/6OV3I6HYGg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792569396; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: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-Last-TLS-Session-Version; bh=aD7zHKGFhWmsXZ4dKfGhDgucVB9qbuaiYAYuijAD4Ik=; b=QnKIELqmK3HpTWDxn7vdqc5HIwfmyul7xICT6tsS2D3csLh+3q6USzQD/KtD63qSk5O0 /e2J0pj4oTuVY3KQaDuN6UBmSSIMeb8SLQTU8e/JFLwBAu4xct8pYby/i+en2ntgbjW/5 eA2x3pcF9RYU5AtB0DB1I+5Zl4q/kIWOm0Pa7d9ihUyAgkoCQ7mLjpbgwqweXaT0yppNA WjdnEeT7nedGs1rML8M0F2iU1laeXC5Jy4gXidfGcFxVTNde0Eh+8SzKdCZaKwAVkfaRj 8MuCOxzJk2EmARtP69Nt4dl4t9i4XByW8hsDobFFwDFcApl97pSjOlRPgSyuIrUBuHw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=KJ0Sxadc; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; 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 A0344606A32F; Wed, 21 Oct 2026 07:56:36 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=KJ0Sxadc X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792569395; b=K/kMxOiMJYkIUC7X5WMmXGU4RdVEsV0FhqfUEFbHTBnQhYWrmnqpmMUPG0TavWSyUmz/ 0wlsIHn9N+8zt+ziLYQdwSIY+8iGtAl9VpM2wPFCKOYIcVX8TNRaXb326RCW01bmaAE7k /+71o185LrUyKyouKXoVjxsxTcXy3xIhlW5xiEK3U9BqRGyGWa8djjtPXuyDZK8gUGBEZ jItRbKUkpsOEENhJN0zPIP3fLrOAjNVwipc8O6Kvz7pB7WHdxYD4YEMC1x10fKbvyeERn Fdm392TWmxPtPNceXNmL8eEodydXrATzHmVNJr1IowUCEqfWqrNT4UqKZp55F3qEzkA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792569395; h=DMARC-Filter:Received:DKIM-Signature:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Last-TLS-Session-Version; bh=aD7zHKGFhWmsXZ4dKfGhDgucVB9qbuaiYAYuijAD4Ik=; b=OHF//v/MUNT7gfG3eMqNkVw51v62JUvZrfxM/xZzjZPpPBYIfvChsC0VTiHBHrjwsZJV 4FvDtIpqT41t98W1JmyDP3kO8nn0c2yNtgS5Sz1vgU+ekmUS3Cg+jBZarYGlyKXOjo0mD naAPOjzMjKfTsBC2ArQoY79O29kvAYossCe+dSAWruQcOG4q7dUsI1UQYWy3drub3hxCh EWRSKEGse64clIzT8vdeuOjYjkZ+7akTogKUMl90iVU6UMG63I+VEOML/RPGQdwtA9fpj AtX+lo//To3AVIjmBgTZRtlu9qVIkE+yG7aRwnz1gdYhsoO8kUKFu9B9hUUYCdBtZww== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=KJ0Sxadc; arc=none smtp.remote-ip=194.13.80.246 X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (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 91DD8606A319; Wed, 21 Oct 2026 07:56:34 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 91DD8606A319 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 78072A02DC; Wed, 21 Oct 2026 09:56:29 +0200 (CEST) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1792569392; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding; bh=aD7zHKGFhWmsXZ4dKfGhDgucVB9qbuaiYAYuijAD4Ik=; b=KJ0SxadciDSku0NZHZsFt1RE4hx3/iXqxDCMSflIz7lyr4kdg+DmaetmfOiENIsBOTfB9n lI4sHt6zuaEWpXB2MpwyNOPjzVqRDjH3j5Q3TdcwnX1KRGjmEs3tXO/XwXBUStEZ4s6xdT 6b2Na3ClFX+6CEKy6oHCSRzquVIGvi6CxrTmm3K1yCWBD5mLNTAv5BPiG2LmwndnLQJ3eG ploxes5FXRTBpcTw21LsIFj+gv1ef95fsghYS6mBWpdSmiZhJFKHl+dDE58hByRhJ6n0/W 6ONNeZHHxWWg9RphOUvu3w1gfuPneDH/kEPRRzu12JXV8VYVUcX4jWImKbzLdA== 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=H4sIAAAAAAAC/3WNzQ6CMBCEX8Xs2TVtJfx48j0MB9gusgYLaSvRE N7dgmePM/PNzAKBvXCAy2EBz7MEGV0S5ngA6ht3ZxSbNBhlcq2MQrKEjp7oOE7jMKAtmqLLK2s NEaTW5LmT9754gwRB/TPDq30wxW1rw3oJcfSf/XfWO/z3YtaoMC+NLrNzmbVZdY0yyRafLEO9r usXQRQG0ccAAAA= X-Change-ID: 20261020-cdc-ncm-netpoll-d7a7f69dd2cc X-Cc: Breno Leitao <leitao@debian.org>, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolai Buchwitz <nb@tipi-net.de>, Mikkel Eskildsen <mke@visotia.com> X-Mailer: b4 0.16.0 X-Last-TLS-Session-Version: TLSv1.3