* [PATCH net] net: ti: netcp: fix device node leak in init_slave()
@ 2026-11-28 16:59 Yuwei Chen
2026-11-28 17:03 ` netdev-bot+sinfo
0 siblings, 1 reply; 2+ messages in thread
From: Yuwei Chen @ 2026-11-28 16:59 UTC (permalink / raw)
To: netdev
init_slave() looks up the PHY node by calling of_parse_phandle()
but never drops the reference to the OF node.
Let's fix it.
Fixes: 0cead3a6a1ab ("net: netcp: ethss: get phy-handle only if link interface is MAC-to-PHY")
Cc: stable@vger.kernel.org
Signed-off-by: Yuwei Chen <2522445001@qq.com>
---
drivers/net/ethernet/ti/netcp_ethss.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c
index ff1fa0a21312..43be44e51fbb 100644
--- a/drivers/net/ethernet/ti/netcp_ethss.c
+++ b/drivers/net/ethernet/ti/netcp_ethss.c
@@ -3042,6 +3042,7 @@ static int init_slave(struct gbe_priv *gbe_dev, struct gbe_slave *slave,
} else {
dev_err(gbe_dev->dev, "unknown ethss(0x%x)\n",
gbe_dev->ss_version);
+ of_node_put(slave->phy_node);
return -EINVAL;
}
@@ -3208,6 +3209,7 @@ static void free_secondary_ports(struct gbe_priv *gbe_dev)
if (slave->phy)
phy_disconnect(slave->phy);
+ of_node_put(slave->phy_node);
list_del(&slave->slave_list);
}
if (gbe_dev->dummy_ndev)
@@ -3780,6 +3782,7 @@ static int gbe_release(void *intf_priv)
gbe_intf->ndev->ethtool_ops = NULL;
list_del(&gbe_intf->gbe_intf_list);
+ of_node_put(gbe_intf->slave->phy_node);
devm_kfree(gbe_intf->dev, gbe_intf->slave);
devm_kfree(gbe_intf->dev, gbe_intf);
return 0;
base-commit: 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc
--
2.53.0.windows.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net] net: ti: netcp: fix device node leak in init_slave()
2026-11-28 16:59 [PATCH net] net: ti: netcp: fix device node leak in init_slave() Yuwei Chen
@ 2026-11-28 17:03 ` netdev-bot+sinfo
0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-11-28 17:03 UTC (permalink / raw)
To: Yuwei Chen; +Cc: netdev
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by LLM and not proven at runtime). If it was triggered
please include the symptoms, like the stack trace or kernel messages.
- What hardware the change was tested on. For driver fixes please
mention the device (and if relevant firmware version) used for
testing, or say that the change was not tested on real hardware.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-28 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-28 16:59 [PATCH net] net: ti: netcp: fix device node leak in init_slave() Yuwei Chen
2026-11-28 17:03 ` netdev-bot+sinfo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox