Skip to contentSkip to conversation

FAILED: patch "[PATCH] pmdomain: imx8m-blk-ctrl: fix out-of-range access of" failed to apply to 6.1-stable tree

PATCH New [email protected] 2 participants 2 messages Feb 7

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 6bd8b4a92a901fae1a422e6f914801063c345e8d
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026020754-trivial-grew-0df2@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 6bd8b4a92a901fae1a422e6f914801063c345e8d Mon Sep 17 00:00:00 2001
From: Xu Yang <[email protected]>
Date: Fri, 30 Jan 2026 13:11:07 +0800
Subject: [PATCH] pmdomain: imx8m-blk-ctrl: fix out-of-range access of
bc->domains

Fix out-of-range access of bc->domains in imx8m_blk_ctrl_remove().

Fixes 2684ac05a8c4 ("soc: imx: add i.MX8M blk-ctrl driver")
drivers/pmdomain/imx/imx8m-blk-ctrl.c +1 -1
index 74bf4936991d..19e992d2ee3b 100644
@@ -340,7 +340,7 @@ static void imx8m_blk_ctrl_remove(struct platform_device *pdev)
 
 	of_genpd_del_provider(pdev->dev.of_node);
 
-	for (i = 0; bc->onecell_data.num_domains; i++) {
+	for (i = 0; i < bc->onecell_data.num_domains; i++) {
 		struct imx8m_blk_ctrl_domain *domain = &bc->domains[i];
 
 		pm_genpd_remove(&domain->genpd);
maintainer
#1 lore raw

PATCH 1/1 pmdomain: imx8m-blk-ctrl: fix out-of-range access of bc->domains

From: Xu Yang <[email protected]>

[ Upstream commit 6bd8b4a92a901fae1a422e6f914801063c345e8d ]

Fix out-of-range access of bc->domains in imx8m_blk_ctrl_remove().

Fixes 2684ac05a8c4 ("soc: imx: add i.MX8M blk-ctrl driver")
---
 drivers/soc/imx/imx8m-blk-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/imx/imx8m-blk-ctrl.c +1 -1
index a430c14ce16d3..29f00ff82c520 100644
@@ -326,7 +326,7 @@ static int imx8m_blk_ctrl_remove(struct platform_device *pdev)
 
 	of_genpd_del_provider(pdev->dev.of_node);
 
-	for (i = 0; bc->onecell_data.num_domains; i++) {
+	for (i = 0; i < bc->onecell_data.num_domains; i++) {
 		struct imx8m_blk_ctrl_domain *domain = &bc->domains[i];
 
 		pm_genpd_remove(&domain->genpd);
Signature · 1 line
2.51.0