Re: git: 02ea6033020e - main - LinuxKPI: Allow spin_lock_irqsave to be called within a critical section

From: Hans Petter Selasky <hps_at_selasky.org>
Date: Wed, 19 Jan 2022 09:50:15 UTC
On 1/18/22 22:35, Vladimir Kondratyev wrote:
> 
> Any ideas how to avoid it in a generic way?

Hi,

On a non-SMP system this will lead to deadlock.

Is it possible you can pre-lock this spin lock earlier, so that it is 
already locked, so instead of

while(trylock());

You have:

assert (trylock() XXX)

Or else,

convert this particular lock to a native FreeBSD spinlock mutex.

--HPS