summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorÖmer Mete Kaya <omermetekaya0@gmail.com>2026-10-24 11:42:08 +0300
committerJakub Kicinski <kuba@kernel.org>2026-10-27 16:19:42 -0700
commit67ae1b80cf73f592b35e4b5e5001a24d6d6c8637 (patch)
treed9aa7e4e6264bed6f47dd61801a44b8b39dadbf6 /scripts/basic
parent7ec720f62ba519a4243ad433f87e77445e81855a (diff)
usbnet: fix EVENT_RX_PAUSED race in usbnet_skb_return()
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(). Discovered by Sashiko, not triggered, not tested on real hardware. Fixes: 43daa96b166c ("usbnet: Stop RX Q on MTU change") Signed-off-by: Ömer Mete Kaya <omermetekaya0@gmail.com> Link: https://patch.msgid.link/20261024084538.256596-1-omermetekaya0@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions