Re: [v2] interconnect: imx: fix use-after-free in imx_icc_node_init_qos()

Markus Elfring
2026-04-26T07:20:38Z

…
> > use dn after the put, leading to use-after-free. Convert to automatic
> > cleanup using __free(device_node) to ensure the reference is always
> > released when dn goes out of scope.
…
> Reviewed-by: Frank Li <Frank.Li@nxp.com>

> > drivers/interconnect/imx/imx.c | 6 ++----
…
> @@ -120,7 +120,8 @@ static int imx_icc_node_init_qos(struct icc_provider *provider,
> struct imx_icc_node *node_data = node->data;
> const struct imx_icc_node_adj_desc *adj = node_data->desc->adj;
> struct device *dev = provider->dev;
> - struct device_node *dn = NULL;
> + struct device_node *__free(device_nod) dn = of_parse_phandle(dev->of_node,
> + adj->phandle_name, 0);

…

A typo was overlooked somehow.

Regards,
Markus