[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231009081750.2073013d@kernel.org>
Date: Mon, 9 Oct 2023 08:17:50 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Chengfeng Ye <dg573847474@...il.com>
Cc: 3chas3@...il.com, davem@...emloft.net, horms@...nel.org,
linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] atm: solos-pci: Fix potential deadlock on
&cli_queue_lock
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.
Powered by blists - more mailing lists