[PATCH net-next 1/2] net: ethernet: ixp4xx: fix OF node leaks in ixp4xx_of_get_platdata()
Linus Walleij
linusw at kernel.org
Tue Nov 17 13:22:54 PST 2026
On Tue, Nov 10, 2026 at 8:08 AM zhaofeng2
<zhaofeng2 at cmss.chinamobile.com> wrote:
> From: Zhao Feng <zhaofeng2 at cmss.chinamobile.com>
>
> ixp4xx_of_get_platdata() resolves the NPE and the RX/TX-ready queue
> phandles with of_parse_phandle_with_fixed_args(), which takes a
> reference on the resolved device node, but the references are never
> dropped, so the NPE and queue manager device nodes are leaked on every
> probe. Since the DT parsing happens before the -EPROBE_DEFER check
> for the MDIO bus instance, the leak also repeats on every probe
> deferral.
>
> Drop the references with of_node_put() once the phandle argument has
> been consumed.
>
> Fixes: 95aafe911db6 ("net: ethernet: ixp4xx: Support device tree probing")
> Signed-off-by: Zhao Feng <zhaofeng2 at cmss.chinamobile.com>
Reviewed-by: Linus Walleij <linusw at kernel.org>
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list