Re: [RFC PATCH] nmi,printk: fix ABBA deadlock between nmi_backtrace and dump_stack_lvl

From: Rik van Riel
Date: Thu Jul 18 2024 - 11:24:27 EST


On Thu, 2024-07-18 at 16:15 +0206, John Ogness wrote:
>
> However, my first suggestion to defer whenever the cpu_sync is held
> really is the only option because console_unlock() will spin on the
> uart
> port lock, and that is also not allowed when holding the cpu_sync.
>
Agreed, even with using only trylocks inside the printk code
and console code, there is no way to control what other locks
might be lurking in the device drivers the console uses.

I'll go try out your first suggestion.

--
All Rights Reversed.