From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2F8B27FB2E; Wed, 10 Dec 2025 07:34:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765352069; cv=none; b=qxK/Z8NAWSX0Crcrfve5ErM/P6J/DL1BLKpymbYKyzpMF/TUclm7faUxG1k8fVuZ/Phdh8WYj9H68zsa9XC4c6SngY9XiScCcVPigMv8WbtWoroNRXajZLnUra6lO6cLPgbHcPMuEWiOMexusK3QUL0Kpq9GgdW0UqDec4PE44o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765352069; c=relaxed/simple; bh=z8dq8wmUzcB9TAc0VUn/s+D2/9A+abTKjIbb5Jl/llM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JwOAZvjLQaEdjtgmtpI9l7Kic3hBQ/Lc2QtQMBOnIJESyLznFYoqSGgpdqzUNz80524g/799pnnVoeGzajRpN+PnU8hs/E2oaCpwLRs3MlrB02rTgsa5QQ0+tylu6aK1VyvLVHWtUU3yizBIm/Kd7N3f74imds3EPGx5uBCM9M4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YjsC2bAS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="YjsC2bAS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0CA6C4CEF1; Wed, 10 Dec 2025 07:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765352069; bh=z8dq8wmUzcB9TAc0VUn/s+D2/9A+abTKjIbb5Jl/llM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YjsC2bASiKgkIV7AmM9c+V7vHkZHZfwMNpR/gKUc+5nZSNCEqgIXVT/k/1gD3+i4x LkXq4kxsp/njnHWItcblqZ6E0s1j9WKrl1SdSLYGkoLBIkFd6hFnMMSlBSh8yHQldD it+oA+d0i/mXHDswSyD7a1smXRJj1P2lpTFIQXP0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Prasad Sodagudi , Praveen Talari , Bjorn Andersson , Linus Walleij , Sasha Levin Subject: [PATCH 6.17 37/60] pinctrl: qcom: msm: Fix deadlock in pinmux configuration Date: Wed, 10 Dec 2025 16:30:07 +0900 Message-ID: <20251210072948.791059932@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251210072947.850479903@linuxfoundation.org> References: <20251210072947.850479903@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Praveen Talari [ Upstream commit 1c2e70397b4125022dba80f6111271a37fb36bae ] Replace disable_irq() with disable_irq_nosync() in msm_pinmux_set_mux() to prevent 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 Signed-off-by: Praveen Talari Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/qcom/pinctrl-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 83eb075b6bfa1..3d6601dc6fcc5 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -215,7 +215,7 @@ static int msm_pinmux_set_mux(struct pinctrl_dev *pctldev, */ if (d && i != gpio_func && !test_and_set_bit(d->hwirq, pctrl->disabled_for_mux)) - disable_irq(irq); + disable_irq_nosync(irq); raw_spin_lock_irqsave(&pctrl->lock, flags); -- 2.51.0