> napi_complete_done() can clear SCHED, arm the watchdog and return false > when deferring hard IRQs. A false return therefore does not guarantee > that the caller still owns NAPI. Masking interrupts after this return > can overwrite the interrupt state established by a successor poll. > > Add napi_complete_done_with_irq_mask() with a mask callback that runs on > false-return paths before ownership can be handed off. The callback > must be non-sleeping, idempotent and leave NAPI state unchanged, since > a state-update retry may invoke it more than once. > > Keep napi_complete_done() as a wrapper without a callback, and inline > the shared implementation to eliminate the callback path for existing > callers. > > 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=1
