Re: [BUG] virtio_net: RX stall caused by masking callbacks after NAPI ownership release

From: Congjie Zhou

Date: Mon Nov 16 2026 - 03:47:34 EST


Tried your patch with my earlier TCP test. No more complete NAPI
stalls so far, thanks!

But LLM found another possible interleaving, though. I reproduced it
in an instrumented KUnit test with injected delays, but haven't hit
it in the TCP test.

With defer_hard_irqs=1, it goes like this:

CPU1 / old poll CPU2 / busy-poll
----------------------------- -----------------------------
Complete: clear SCHED,
arm timer, return false.
Take NAPI ownership.
Enter busy_poll_stop(), clear
IN_BUSY_POLL. The final poll
enables callbacks, then pauses
before completion.
Watchdog expires, sees
SCHED=1, exits without
scheduling or setting MISSED.
Disable callbacks.
Timer=0, SCHED=1, so skip
napi_schedule() and exit.
napi_complete_done(..., 0):
defer count=0, no MISSED.
Clear SCHED, return true.
Queue is empty, exit.

Then the device adds a used entry, but callbacks are still disabled,
with no timer or poll pending.

So SCHED=1 at the check, but that poll has already enabled callbacks
and won't enable them again after the old poll masks them.