Thread (3 messages) flat view 3 messages, 3 authors, 2026-01-30

Re: [PATCH] pmdomain: imx8m-blk-ctrl: fix out-of-range access of bc->domains

From: Ulf Hansson <hidden>
Date: 2026-01-30 11:29:28
Also in: imx, linux-pm, lkml

On Fri, 30 Jan 2026 at 06:11, Xu Yang [off-list ref] wrote:
Fix out-of-range access of bc->domains in imx8m_blk_ctrl_remove().

Fixes: 2684ac05a8c4 ("soc: imx: add i.MX8M blk-ctrl driver")
Cc: stable@kernel.org
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Applied for fixes, thanks!

Kind regards
Uffe

quoted hunk ↗ jump to hunk
---
 drivers/pmdomain/imx/imx8m-blk-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pmdomain/imx/imx8m-blk-ctrl.c b/drivers/pmdomain/imx/imx8m-blk-ctrl.c
index 74bf4936991d..19e992d2ee3b 100644
--- a/drivers/pmdomain/imx/imx8m-blk-ctrl.c
+++ b/drivers/pmdomain/imx/imx8m-blk-ctrl.c
@@ -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);
--
2.34.1
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help