[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <323c2a02-2552-ac49-8557-2a6da82b29ed@quicinc.com>
Date: Tue, 1 Mar 2022 01:00:56 +0530
From: "Maulik Shah (mkshah)" <quic_mkshah@...cinc.com>
To: Marc Zyngier <maz@...nel.org>, <linux-kernel@...r.kernel.org>
CC: Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
<linux-arm-msm@...r.kernel.org>
Subject: Re: [PATCH 4/5] irqchip/qcom-pdc: Fix broken locking
Hi,
On 2/24/2022 3:42 PM, Marc Zyngier wrote:
> pdc_enable_intr() serves as a primitive to qcom_pdc_gic_{en,dis}able,
> and has a raw spinlock for mutual exclusion, which is uses with
> interruptible primitives.
>
> This means that this critical section can itself be interrupted.
> Should the interrupt also be a PDC interrupt, and the endpoint driver
> perform an irq_disable() on that interrupt, we end-up in a deadlock.
>
> Fix this by using the irqsave/irqrestore variants of the locking
> primitives.
>
> Signed-off-by: Marc Zyngier <maz@...nel.org>
Reviewed-by: Maulik Shah <quic_mkshah@...cinc.com>
Thanks,
Maulik
> ---
> drivers/irqchip/qcom-pdc.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>
Powered by blists - more mailing lists