net: usb: cdc_mbim: don't enable BHs in tx_fixup under netpoll

cdc_mbim_tx_fixup() has the same spin_unlock_bh() as cdc_ncm_tx_fixup().
Under netpoll it runs pending softirqs while the txq lock is held, and
a transmit from one of them spins on that lock.

Use plain spin_lock() as in cdc_ncm.

Fixes: 9bf211a30b ("net: cdc_mbim: adding MBIM driver")
Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
Link: https://patch.msgid.link/20261024-cdc-ncm-netpoll-v3-2-6284ca03f967@tipi-net.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Nicolai Buchwitz 2026-10-24 15:23:07 +02:00 committed by Jakub Kicinski
parent 108ca34cf4
commit bfd7ced012

View File

@ -289,9 +289,10 @@ static struct sk_buff *cdc_mbim_tx_fixup(struct usbnet *dev, struct sk_buff *skb
}
}
spin_lock_bh(&ctx->mtx);
/* BHs or IRQs are always off here, see cdc_ncm_tx_fixup() */
spin_lock(&ctx->mtx);
skb_out = cdc_ncm_fill_tx_frame(dev, skb, sign);
spin_unlock_bh(&ctx->mtx);
spin_unlock(&ctx->mtx);
return skb_out;
error: