Re: [net-next v6 5/9] net: napi: Add napi_config
From: Joe Damato
Date: Mon Dec 02 2024 - 12:34:22 EST
On Sat, Nov 30, 2024 at 12:45:01PM -0800, Jakub Kicinski wrote:
> On Wed, 27 Nov 2024 12:00:02 -0800 Joe Damato wrote:
> > CPU 0:
> > pcnet32_open
> > lock(lp->lock)
> > napi_enable
> > napi_hash_add <- before this executes, CPU 1 proceeds
> > lock(napi_hash_lock)
> > CPU 1:
> > pcnet32_close
> > napi_disable
> > napi_hash_del
> > lock(napi_hash_lock)
> > < INTERRUPT >
>
> How about making napi_hash_lock irq-safe ?
> It's a control path lock, it should be fine to disable irqs.
Ah, right. That should fix it.
I'll write a fixes against net and change the napi_hash_lock to use
spin_lock_irqsave and spin_lock_irqrestore and send shortly.
> > pcnet32_interrupt
> > lock(lp->lock)
>