[PATCH net v3 0/2] net: usb: cdc_ncm/cdc_mbim: fix netpoll lockup in tx_fixup

From: Nicolai Buchwitz

Date: Sat Oct 24 2026 - 09:25:26 EST


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 tested the v2 version of it. Patch 2
fixes the same code in cdc_mbim and is untested.

Changes in v3:
- Use plain spin_lock() instead of spin_lock_irqsave() (Jakub)
- Drop Tested-by and Reviewed-by tags since the locking changed
- Link to v2: https://lore.kernel.org/r/20261021-cdc-ncm-netpoll-v2-0-8818965bbb69@xxxxxxxxxxx

Changes in v2:
- Reverse xmas in patch 1
- Link to v1: https://lore.kernel.org/r/20261020-cdc-ncm-netpoll-v1-0-682184384b49@xxxxxxxxxxx

Signed-off-by: Nicolai Buchwitz <nb@xxxxxxxxxxx>
---
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 | 5 +++--
drivers/net/usb/cdc_ncm.c | 7 +++++--
2 files changed, 8 insertions(+), 4 deletions(-)
---
base-commit: 044ad3c90d9d2df2c5cb3325ae17b4e9603a311f
change-id: 20261020-cdc-ncm-netpoll-d7a7f69dd2cc

Best regards,
--
Nicolai Buchwitz <nb@xxxxxxxxxxx>