Re: [PATCH] fsl/fman: Fix fm_node reference leak in read_dts_node()

From: Simon Horman

Date: Mon Sep 21 2026 - 06:19:23 EST


On Thu, Sep 17, 2026 at 11:03:42AM +0000, Wentao Liang wrote:
> of_node_get() takes a reference on the FMan device node. That reference
> is released neither on the success path, which returns straight after
> of_platform_populate(), nor on the failure paths that jump to fman_free
> without going through fman_node_put(). Neither read_dts_node() nor its
> caller keeps fm_node around to release it later.
>
> Release the reference on the success path, and route the remaining
> failure paths through fman_node_put().
>
> Fixes: ecb239d96d36 ("ethernet: fman: fix wrong of_node_put() in probe function")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>

Hi Wentao,

As flagged by W=1 builds, with this patch applied the fman_free tag is no
longer used. It should be removed.

Please be sure to check that your patches do not introduce any
new warnings when compiled with W=1.

Link: https://docs.kernel.org/process/maintainer-netdev.html#testing

--
pw-bot: changes-requested