Re: [PATCH net v5] usbnet: fix EVENT_RX_PAUSED race in usbnet_skb_return()

From: patchwork-bot+netdevbpf

Date: Tue Oct 27 2026 - 19:30:33 EST


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Sat, 24 Oct 2026 11:42:08 +0300 you wrote:
> On SMP, usbnet_skb_return() can observe EVENT_RX_PAUSED as set on CPU0
> while usbnet_resume_rx() clears the flag and drains rxq_pause on CPU1.
> The skb can then be queued after the drain has completed and remain
> stranded until the next MTU change or device stop.
>
> Synchronize the EVENT_RX_PAUSED state transition and paused-queue
> dequeue operations with rxq_pause.lock. In usbnet_resume_rx() splice
> the paused queue into a local queue under the lock, then drain the
> local queue lock-free. In usbnet_skb_return() use a double-check
> pattern under rxq_pause.lock on the slow path, keeping the normal
> RX fast path lock-free. Use spin_lock_irqsave() to match the lockdep
> class shared with other sk_buff_head locks taken from hardirq context
> in defer_bh().
>
> [...]

Here is the summary with links:
- [net,v5] usbnet: fix EVENT_RX_PAUSED race in usbnet_skb_return()
https://git.kernel.org/netdev/net/c/67ae1b80cf73

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html