[PATCH 0/3] clk: imx: imx8qxp-lpcg: Fix the clock-indices parsing
Peng Fan
peng.fan at oss.nxp.com
Mon Nov 2 17:39:53 PST 2026
On Mon, Nov 02, 2026 at 01:48:48PM +0200, Abel Vesa wrote:
>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 at 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
>
Reviewed-by: Peng Fan <peng.fan at nxp.com>
More information about the linux-arm-kernel
mailing list