Re: [PATCH net-next] net: netsec: fix device_node reference leak on phy_np

From: patchwork-bot+netdevbpf

Date: Wed Sep 16 2026 - 20:43:13 EST


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Sun, 13 Sep 2026 14:41:02 +0800 you wrote:
> netsec_of_probe() takes a reference on the PHY device_node with
> of_parse_phandle() and stores it in priv->phy_np, but the driver never
> drops it. One device_node reference is leaked per probe, on the success
> path as well as on every error path reached after netsec_of_probe().
>
> Neither consumer takes ownership. of_mdio_parse_addr() is a static
> inline taking a const struct device_node * that only reads the "reg"
> property. of_phy_connect() borrows as well: of_phy_get_and_connect() in
> drivers/net/mdio/of_mdio.c brackets its own call with of_node_get() at
> :364 and of_node_put() at :373, which would be a double put if
> of_phy_connect() consumed the reference.
>
> [...]

Here is the summary with links:
- [net-next] net: netsec: fix device_node reference leak on phy_np
https://git.kernel.org/netdev/net/c/5ae916fabca1

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html