[<prev] [next>] [day] [month] [year] [list]
Message-ID: <YHmjKhH7xWz0BxEv@hovoldconsulting.com>
Date: Fri, 16 Apr 2021 16:46:02 +0200
From: Johan Hovold <johan@...nel.org>
To: dillon min <dillon.minfei@...il.com>
Cc: Alexandre TORGUE <alexandre.torgue@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Erwan Le Ray <erwan.leray@...s.st.com>,
Gerald Baeza <gerald.baeza@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH 2/3] serial: stm32: fix threaded interrupt handling
On Fri, Apr 16, 2021 at 10:35:25PM +0800, dillon min wrote:
> Hi Johan
>
> Thanks for share your patch.
>
> Johan Hovold <johan@...nel.org>于2021年4月16日 周五22:11写道:
>
> > When DMA is enabled the receive handler runs in a threaded handler, but
> > the primary handler up until very recently neither disabled interrupts
> > in the device or used IRQF_ONESHOT. This would lead to a deadlock if an
> > interrupt comes in while the threaded receive handler is running under
> > the port lock.
> >
> Greg told me there was a patch fixed this case. In case hard irq &
> threaded_fn both offered. The local_irq_save() will be executed before call
> driver’s threaded handler.
>
> Post the original mail from Greg
>
> Please see 81e2073c175b ("genirq: Disable interrupts for force threaded
> handlers") for when threaded irq handlers have irqs disabled, isn't that
> the case you are trying to "protect" from here?
>
> Why is the "threaded" flag used at all? The driver should not care.
>
> Also see 9baedb7baeda ("serial: imx: drop workaround for forced irq
> threading") in linux-next for an example of how this was fixed up in a
> serial driver.
Neither of these commits are (directly) related to the problem this
patch addresses (they are about force-threaded handlers, this is about a
normal threaded handler which run with interrupts enabled).
Johan
Powered by blists - more mailing lists