From: sashiko-bot@kernel.org
To: "Gabriel Fernandez" <gabriel.fernandez@foss.st.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 4/6] soc: st: stm32mp2-syscfg: register the clock device
Date: Wed, 18 Nov 2026 12:13:30 +0000 [thread overview]
Message-ID: <sashiko-outbox-220889@kernel.org> (raw)
In-Reply-To: <20261118-ups_mp25_clk_syscfg-v3-4-935de791a4ce@foss.st.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] soc: st: stm32mp2-syscfg: missing Signed-off-by trailer for
patch handler
- [Medium] soc: st: stm32mp2-syscfg: dangling syscon regmap on
stm32mp2_syscfg_probe() error
--
commit 21aab13c70f2bda74a29260c2c7a004a36470fe5
Author: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> soc: st: stm32mp2-syscfg: register the clock device
>
> The STM32MP23x and STM32MP25x SYSCFG provides the LTDC pixel clock mux,
> whose driver is an auxiliary driver since the SYSCFG node is bound to
> this driver.
>
> Create the auxiliary device for the clock driver.
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> [gabriel.fernandez@foss.st.com: create the device on STM32MP23x too]
[Severity: High]
Since Gabriel Fernandez modified and handled this patch in the delivery
path, a Signed-off-by trailer from Gabriel Fernandez is required after
the modification note to satisfy the Developer's Certificate of Origin
chain.
> diff --git a/drivers/soc/st/stm32mp2-syscfg.c b/drivers/soc/st/stm32mp2-syscfg.c
> index 0d45fdef46b73..285561fb9f17a 100644
> --- a/drivers/soc/st/stm32mp2-syscfg.c
> +++ b/drivers/soc/st/stm32mp2-syscfg.c
[ ... ]
> @@ -51,7 +52,15 @@ static int stm32mp2_syscfg_probe(struct platform_device *pdev)
> else if (ret)
> return dev_err_probe(dev, ret, "failed to register the regmap\n");
>
> - return devm_of_platform_populate(dev);
> + ret = devm_of_platform_populate(dev);
> + if (ret)
> + return ret;
> +
> + if (!devm_auxiliary_device_create(dev, "clk", NULL))
> + return dev_err_probe(dev, -ENODEV,
> + "failed to register the clock device\n");
> +
> + return 0;
> }
[Severity: Medium]
Can a failure in devm_of_platform_populate() or
devm_auxiliary_device_create() leave a dangling regmap pointer in the
global syscon_list?
stm32mp2_syscfg_probe() allocates regmap with devm_regmap_init_mmio() and
publishes it to syscon_list via of_syscon_register_regmap(), which has no
unregistration helper. If either of the later calls fails, devres
releases regmap and unmaps base while syscon_list retains the pointer,
causing a use-after-free on subsequent syscon regmap lookups. Calling
of_syscon_register_regmap() last in stm32mp2_syscfg_probe() would avoid
publishing the regmap before fallible setup completes.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118-ups_mp25_clk_syscfg-v3-0-935de791a4ce@foss.st.com?part=4
next prev parent reply other threads:[~2026-11-18 12:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 11:59 [PATCH v3 0/6] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux Gabriel Fernandez
2026-11-18 11:59 ` [PATCH v3 1/6] dt-bindings: arm: stm32: Add clock inputs to STM32MP2 SYSCFG Gabriel Fernandez
2026-11-18 11:59 ` [PATCH v3 2/6] soc: st: stm32mp2-syscfg: register the syscon regmap Gabriel Fernandez
2026-11-18 12:37 ` sashiko-bot
2026-11-18 11:59 ` [PATCH v3 3/6] clk: stm32: Add STM32MP25 SYSCFG clock driver Gabriel Fernandez
2026-11-19 19:20 ` Brian Masney
2026-11-18 11:59 ` [PATCH v3 4/6] soc: st: stm32mp2-syscfg: register the clock device Gabriel Fernandez
2026-11-18 12:13 ` sashiko-bot [this message]
2026-11-18 11:59 ` [PATCH v3 5/6] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp23 Gabriel Fernandez
2026-11-18 11:59 ` [PATCH v3 6/6] arm64: dts: st: add LTDC pixel clock mux inputs on stm32mp25 Gabriel Fernandez
2026-11-19 9:58 ` [PATCH v3 0/6] clk: stm32: Add the STM32MP2 SYSCFG LTDC pixel clock mux Gabriel FERNANDEZ
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=sashiko-outbox-220889@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gabriel.fernandez@foss.st.com \
--cc=linux-clk@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.