Re: [PATCH v2 1/2] atm: solos-pci: Fix potential deadlock on &cli_queue_lock

From: Jakub Kicinski
Date: Mon Oct 09 2023 - 11:18:01 EST


On Sat, 7 Oct 2023 23:58:36 +0800 Chengfeng Ye wrote:
> > and irqsave here. I think you're right that it's just softirq (== bh)
> > that may deadlock, so no need to take the irqsave() version in process
> > context.
>
> Yes, spin_lock_bh() is enough.
>
> I just found spin_lock_irqsave() is more frequently used in this file, so I
> also used spin_lock_irqsave() here for uniformity consideration at that time.
>
> Should I send a new patch series to change this to spin_lock_bh()? That's
> better for performance consideration.

Yes, performance is one reason and another is that the code will
be easier to understand if the locking matches the requirements.