From: sashiko-bot@kernel.org
To: "Miquel Raynal (Schneider Electric)" <miquel.raynal@bootlin.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 6/7] clk: Add support for clock nexus dt bindings
Date: Thu, 16 Jul 2026 11:37:08 +0000 [thread overview]
Message-ID: <20260716113708.9CED11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260716-schneider-v7-2-rc1-eip201-upstream-v3-6-98454e83845c@bootlin.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Unconditional dereference of optional `out_args` pointer in `of_parse_phandle_with_args_map()`.
--
--- Patch [6]: [PATCH v3 6/7] clk: Add support for clock nexus dt bindings ---
commit 6c00bcac0a2f79ec97235472147341c2654575cc
Author: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
clk: Add support for clock nexus dt bindings
This commit introduces support for clock nexus device tree bindings, allowing
inner clocks to be mapped to inlet clocks via the clock-map property. It
accomplishes this by transitioning the clock subsystem to use
of_parse_phandle_with_args_map() instead of of_parse_phandle_with_args().
> diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
> --- a/drivers/clk/clk-conf.c
> +++ b/drivers/clk/clk-conf.c
> @@ -25,8 +25,8 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
> node);
>
> for (index = 0; index < num_parents; index++) {
> - rc = of_parse_phandle_with_args(node, "assigned-clock-parents",
> - "#clock-cells", index, &clkspec);
> + rc = of_parse_phandle_with_args_map(node, "assigned-clock-parents",
> + "clock", index, &clkspec);
[Severity: High]
This is a pre-existing issue, but since this patch transitions the subsystem
to use of_parse_phandle_with_args_map(), it seems worth noting a flaw in the
underlying API.
Looking at of_parse_phandle_with_args_map() in drivers/of/base.c, there is an
unconditional dereference of the out_args pointer:
drivers/of/base.c:of_parse_phandle_with_args_map() {
...
ret = __of_parse_phandle_with_args(np, list_name, cells_name, -1, index,
out_args);
if (ret)
return ret;
/* Get the #<list>-cells property */
cur = out_args->np;
...
}
Since out_args is documented as an optional pointer for this exported symbol,
would a caller passing null immediately trigger a kernel panic here due to a
null pointer dereference?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260716-schneider-v7-2-rc1-eip201-upstream-v3-0-98454e83845c@bootlin.com?part=6
next prev parent reply other threads:[~2026-07-16 11:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 10:44 [PATCH v3 0/7] clk: Add support for clock nexus Miquel Raynal (Schneider Electric)
2026-07-16 10:44 ` [PATCH v3 1/7] dt-bindings: clock: Introduce nexus nodes Miquel Raynal (Schneider Electric)
2026-07-16 10:51 ` sashiko-bot
2026-07-16 10:44 ` [PATCH v3 2/7] clk: tests: Add clk_parse_clkspec() Kunit testing Miquel Raynal (Schneider Electric)
2026-07-16 11:04 ` sashiko-bot
2026-07-16 10:44 ` [PATCH v3 3/7] clk: tests: Add Kunit testing for of_clk_get_parent_name() Miquel Raynal (Schneider Electric)
2026-07-16 10:44 ` [PATCH v3 4/7] clk: Improve a couple of comments Miquel Raynal (Schneider Electric)
2026-07-16 10:44 ` [PATCH v3 5/7] clk: Use the generic OF phandle parsing in only one place Miquel Raynal (Schneider Electric)
2026-07-16 10:44 ` [PATCH v3 6/7] clk: Add support for clock nexus dt bindings Miquel Raynal (Schneider Electric)
2026-07-16 11:37 ` sashiko-bot [this message]
2026-07-16 10:44 ` [PATCH v3 7/7] clk: tests: Add Kunit testing for nexus nodes Miquel Raynal (Schneider Electric)
2026-07-16 11:42 ` sashiko-bot
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=20260716113708.9CED11F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox