> virtqueue_napi_complete() prepares callbacks before calling
> napi_complete_done(), then disables them if completion returns false.
> On the hard IRQ deferral path, completion can release NAPI ownership
> and arm the watchdog before returning false.
> 
> A successor poll can rearm callbacks and complete before the old caller
> executes virtqueue_disable_cb(). The stale mask then disables
> notifications again. If the one-shot watchdog has already run, no NAPI
> owner or timer remains to consume later used entries, causing a
> persistent RX stall.
> 
> Use napi_complete_done_with_irq_mask() to disable callbacks before
> completion can hand NAPI to a successor, and remove the stale mask after
> a false return. Keep virtqueue_enable_cb_prepare() before completion:
> moving it after ownership release would reintroduce the RX virtqueue
> race fixed by commit cbdadbbf0c79 ("virtio_net: fix race in RX VQ
> processing").
> 
> Fixes: 6f8b12d661d0 ("net: napi: add hard irqs deferral feature")
> Signed-off-by: Congjie Zhou <[email protected]>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=2


Reply via email to