From: Linus Walleij <linus.walleij@linaro.org>
To: Praveen Talari <praveen.talari@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Dmitry Baryshkov <lumag@kernel.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-serial@vger.kernel.org, alexey.klimov@linaro.org,
krzk@kernel.org, bryan.odonoghue@linaro.org,
jorge.ramirez@oss.qualcomm.com,
dmitry.baryshkov@oss.qualcomm.com,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
psodagud@quicinc.com, djaggi@quicinc.com,
quic_msavaliy@quicinc.com, quic_vtanuku@quicinc.com,
quic_arandive@quicinc.com, quic_shazhuss@quicinc.com,
quic_cchiluve@quicinc.com,
Prasad Sodagudi <prasad.sodagudi@oss.qualcomm.com>
Subject: Re: [PATCH v1 2/4] pinctrl: qcom: msm: Fix potential deadlock in pinmux configuration
Date: Wed, 12 Nov 2025 13:43:30 +0100 [thread overview]
Message-ID: <CACRpkdYEbxtjoi8KQxS5fY6xr3UZwQmG-yKvT3L8fRcCXDaAwQ@mail.gmail.com> (raw)
In-Reply-To: <20251110101043.2108414-3-praveen.talari@oss.qualcomm.com>
Hi Praveen,
thanks for your patch!
On Mon, Nov 10, 2025 at 11:11 AM Praveen Talari
<praveen.talari@oss.qualcomm.com> wrote:
> Replace disable_irq() with disable_irq_nosync() in msm_pinmux_set_mux()
> to prevent potential deadlock when wakeup IRQ is triggered on the same
> GPIO being reconfigured.
>
> The issue occurs when a wakeup IRQ is triggered on a GPIO and the IRQ
> handler attempts to reconfigure the same GPIO's pinmux. In this scenario,
> msm_pinmux_set_mux() calls disable_irq() which waits for the currently
> running IRQ handler to complete, creating a circular dependency that
> results in deadlock.
>
> Using disable_irq_nosync() avoids waiting for the IRQ handler to
> complete, preventing the deadlock condition while still properly
> disabling the interrupt during pinmux reconfiguration.
>
> Suggested-by: Prasad Sodagudi <prasad.sodagudi@oss.qualcomm.com>
> Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
I applied this patch 2/4 to the pin control tree for fixes.
I removed the word "potential" from subject and text so as to
reflect what Bjorn is saying: it's a very real issue.
Thanks for fixing this!
Linus Walleij
next prev parent reply other threads:[~2025-11-12 12:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 10:10 [PATCH v1 0/4] Enable Serial on SA8255p Qualcomm platforms Praveen Talari
2025-11-10 10:10 ` [PATCH v1 1/4] arm64: dts: qcom: qrb2210-rb1: Fix UART3 wakeup IRQ storm Praveen Talari
2025-11-10 11:10 ` Konrad Dybcio
2025-11-10 10:10 ` [PATCH v1 2/4] pinctrl: qcom: msm: Fix potential deadlock in pinmux configuration Praveen Talari
2025-11-11 4:08 ` Bjorn Andersson
2025-11-11 5:22 ` Praveen Talari
2025-11-11 15:35 ` Bjorn Andersson
2025-11-12 12:43 ` Linus Walleij [this message]
2025-11-10 10:10 ` [PATCH v1 3/4] serial: qcom-geni: Enable PM runtime for serial driver Praveen Talari
2025-11-26 13:01 ` Andy Shevchenko
2025-11-10 10:10 ` [PATCH v1 4/4] serial: qcom-geni: Enable Serial on SA8255p Qualcomm platforms Praveen Talari
2025-11-26 13:06 ` Andy Shevchenko
2025-11-14 0:18 ` (subset) [PATCH v1 0/4] " Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACRpkdYEbxtjoi8KQxS5fY6xr3UZwQmG-yKvT3L8fRcCXDaAwQ@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=alexey.klimov@linaro.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=djaggi@quicinc.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=jorge.ramirez@oss.qualcomm.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=prasad.sodagudi@oss.qualcomm.com \
--cc=praveen.talari@oss.qualcomm.com \
--cc=psodagud@quicinc.com \
--cc=quic_arandive@quicinc.com \
--cc=quic_cchiluve@quicinc.com \
--cc=quic_msavaliy@quicinc.com \
--cc=quic_shazhuss@quicinc.com \
--cc=quic_vtanuku@quicinc.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).