Re: [PATCH net v2 1/2] net: usb: cdc_ncm: don't enable BHs in tx_fixup under netpoll
From: Simon Horman
Date: Thu Oct 22 2026 - 09:05:40 EST
On Wed, Oct 21, 2026 at 09:56:18AM +0200, Nicolai Buchwitz wrote:
> netpoll holds the txq lock and calls ndo_start_xmit() with IRQs off but
> BHs on. The spin_unlock_bh() in cdc_ncm_tx_fixup() then runs pending
> softirqs. If one of them transmits, it spins on the txq lock that
> netpoll holds. With netconsole on a cdc_ncm device this ends in a soft
> or hard lockup.
>
> Use spin_lock_irqsave(), which is safe both under netpoll and on the
> normal xmit path.
>
> Fixes: c84ff1d6dff3 ("cdc_ncm: reduce driver latency in the data path")
> Reported-by: Mikkel Eskildsen <mke@xxxxxxxxxxx>
> Closes: https://lore.kernel.org/netdev/PRAP189MB185019A5A8D411482BB6E0CDA9982@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
> Tested-by: Mikkel Eskildsen <mke@xxxxxxxxxxx>
> Signed-off-by: Nicolai Buchwitz <nb@xxxxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>