Re: [RFC PATCH net-next 1/2] net: napi: Fix interrupts permanently disabled during busy poll
From: Jakub Kicinski
Date: Mon May 04 2026 - 21:00:22 EST
On Mon, 4 May 2026 11:30:47 +0000 Dragos Tatulea wrote:
> > > That would also follow the scheme in napi_schedule_done(). (Note that
> > > swapping arm/clear does mean that we can get a wasted-timer outcome.)
> > >
> > If it is wasted is fine. I figured that this could end up with a timer
> > scheduled after the napi deletion:
> >
> > 1. busy_poll_stop(): clears SCHED bit.
> > 2. napi_disable() runs past SCHED wait, cancels timer and caller
> > deletes napi mem.
> > 3. busy_poll_stop(): napi->timer is armed but napi is freed memory
> > by now.
> >
> > What am I missing here?
> >
> Gentle ping. Once I understand how/why the above is incorrect I can
> update the patch and send it.
Eh, I didn't respond cause I got depressed. Look around for the pattern
you are calling incorrect in existing code and you'll figure out why...