[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3b77177-7c00-4459-9515-37afe741e9dd@kernel.org>
Date: Fri, 22 Mar 2024 07:54:42 +0100
From: Jiri Slaby <jirislaby@...nel.org>
To: liu.yec@....com, daniel.thompson@...aro.org
Cc: dianders@...omium.org, gregkh@...uxfoundation.org,
jason.wessel@...driver.com, kgdb-bugreport@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH V4] kdb: Fix the deadlock issue in KDB debugging.
On 21. 03. 24, 12:50, liu.yec@....com wrote:
> From: LiuYe <liu.yeC@....com>
>
> Currently, if CONFIG_KDB_KEYBOARD is enabled, then kgdboc will
> attempt to use schedule_work() to provoke a keyboard reset when
> transitioning out of the debugger and back to normal operation.
> This can cause deadlock because schedule_work() is not NMI-safe.
>
> The stack trace below shows an example of the problem. In this
> case the master cpu is not running from NMI but it has parked
> the slave CPUs using an NMI and the parked CPUs is holding
> spinlocks needed by schedule_work().
I am missing here an explanation (perhaps because I cannot find any docs
for irq_work) why irq_work works in this case.
And why you need to schedule another work in the irq_work and not do the
job directly.
thanks,
--
js
suse labs
Powered by blists - more mailing lists