* [PATCH] net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe
@ 2022-12-29 6:29 Miaoqian Lin
2022-12-30 7:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Miaoqian Lin @ 2022-12-29 6:29 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Michal Simek,
Florian Fainelli, Brandon Maier, netdev, linux-arm-kernel,
linux-kernel
Cc: linmq006
of_phy_find_device() return device node with refcount incremented.
Call put_device() to relese it when not needed anymore.
Fixes: ab4e6ee578e8 ("net: phy: xgmiitorgmii: Check phy_driver ready before accessing")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/net/phy/xilinx_gmii2rgmii.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
index 8dcb49ed1f3d..7fd9fe6a602b 100644
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
@@ -105,6 +105,7 @@ static int xgmiitorgmii_probe(struct mdio_device *mdiodev)
if (!priv->phy_dev->drv) {
dev_info(dev, "Attached phy not ready\n");
+ put_device(&priv->phy_dev->mdio.dev);
return -EPROBE_DEFER;
}
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe
2022-12-29 6:29 [PATCH] net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe Miaoqian Lin
@ 2022-12-30 7:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-30 7:50 UTC (permalink / raw)
To: Miaoqian Lin
Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
michal.simek, f.fainelli, brandon.maier, netdev, linux-arm-kernel,
linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Thu, 29 Dec 2022 10:29:25 +0400 you wrote:
> of_phy_find_device() return device node with refcount incremented.
> Call put_device() to relese it when not needed anymore.
>
> Fixes: ab4e6ee578e8 ("net: phy: xgmiitorgmii: Check phy_driver ready before accessing")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> drivers/net/phy/xilinx_gmii2rgmii.c | 1 +
> 1 file changed, 1 insertion(+)
Here is the summary with links:
- net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe
https://git.kernel.org/netdev/net/c/d039535850ee
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-30 8:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-29 6:29 [PATCH] net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe Miaoqian Lin
2022-12-30 7:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).