mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] clk: imx: imx8qxp-lpcg: Fix the clock-indices parsing
@ 2026-11-02 11:48 Abel Vesa
  2026-11-02 11:48 ` [PATCH 1/3] clk: imx: imx8qxp-lpcg: Reject duplicate clock indices Abel Vesa
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Abel Vesa @ 2026-11-02 11:48 UTC (permalink / raw)
  To: Abel Vesa, Peng Fan, Stephen Boyd, Brian Masney, Jerome Brunet,
	Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Dong Aisheng, Shawn Guo
  Cc: linux-clk, imx, linux-arm-kernel, linux-kernel, Abel Vesa,
	stable, Sashiko

imx_lpcg_parse_clks_from_dt() trusts the clock-indices property of the
LPCG node. Duplicate entries leak a clock and make the error path
unregister another one twice, and more entries than an LPCG has clock
outputs overflow the on-stack arrays the property and the related
clock names are read into. The first two patches reject both. The last
one makes a failure to read the parent names return an error code
instead of the number of clocks.

Prepared with help from an LLM-based assistant.

Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
---
Abel Vesa (3):
      clk: imx: imx8qxp-lpcg: Reject duplicate clock indices
      clk: imx: imx8qxp-lpcg: Fix stack overflow with too many clock indices
      clk: imx: imx8qxp-lpcg: Return an error if the parent names cannot be read

 drivers/clk/imx/clk-imx8qxp-lpcg.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261102-imx8qxp-lpcg-duplicate-clock-indices-828fbaee36b0

Best regards,
--  

Abel


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-03  1:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 11:48 [PATCH 0/3] clk: imx: imx8qxp-lpcg: Fix the clock-indices parsing Abel Vesa
2026-11-02 11:48 ` [PATCH 1/3] clk: imx: imx8qxp-lpcg: Reject duplicate clock indices Abel Vesa
2026-11-02 21:16   ` Frank Li
2026-11-02 11:48 ` [PATCH 2/3] clk: imx: imx8qxp-lpcg: Fix stack overflow with too many " Abel Vesa
2026-11-02 21:24   ` Frank Li
2026-11-02 11:48 ` [PATCH 3/3] clk: imx: imx8qxp-lpcg: Return an error if the parent names cannot be read Abel Vesa
2026-11-02 21:26   ` Frank Li
2026-11-03  1:39 ` [PATCH 0/3] clk: imx: imx8qxp-lpcg: Fix the clock-indices parsing Peng Fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®