Re: [PATCH net] net: cancel napi->timer after the grace period in netif_napi_del()

From: Mani Tofigh

Date: Thu Nov 05 2026 - 16:51:31 EST


On 11/3/26 1:37 PM, Eric Dumazet wrote:
hrtimer_try_to_cancel(&n->timer);


One case I'm not sure about. If napi_watchdog() is running when
hrtimer_start() is called, the timer is queued again and
hrtimer_try_to_cancel() returns -1 without dequeuing it. With
preemptible RCU two napi_suspend_irqs() callers could both end up there
after the delete. None of the callers run in hard irq or from
napi_watchdog() so would hrtimer_cancel() be ok there?

Can you give this a try with your reproducer ?



Yes, it works.

I'll send v2 with your approach.


Thanks!
Mani