[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YJugS4fiUBgPvIS6@hovoldconsulting.com>
Date: Wed, 12 May 2021 11:30:51 +0200
From: Johan Hovold <johan@...nel.org>
To: Michael Walle <michael@...le.cc>
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Angelo Dureghello <angelo.dureghello@...esys.com>,
Fugang Duan <fugang.duan@....com>,
Philippe Schenker <philippe.schenker@...adex.com>
Subject: Re: [PATCH 4/8] serial: fsl_lpuart: handle break and make sysrq work
On Tue, May 11, 2021 at 10:01:44PM +0200, Michael Walle wrote:
> Although there is already (broken) sysrq characters handling, a break
> condition was never detected. There is also a possible deadlock because
> we might call handle_sysrq() while still holding the port lock.
Where's the possible deadlock?
First, as you point out above the driver currently doesn't detect breaks
so the sysrq handler is never called and there's no risk for deadlocks
in the console code.
Second, the driver's console implementation explicitly handles being
called recursively so would not deadlock after you start detecting
breaks either.
> Add support for break detection and use the proper
> uart_unlock_and_check_sysrq() to defer calling handle_sysrq().
Johan
Powered by blists - more mailing lists