* [PATCH] ethtool: Fix refcount leak in gfar_get_ts_info
@ 2022-03-09 9:11 Miaoqian Lin
2022-03-09 20:19 ` Jesse Brandeburg
2022-03-10 20:30 ` [PATCH] " patchwork-bot+netdevbpf
0 siblings, 2 replies; 7+ messages in thread
From: Miaoqian Lin @ 2022-03-09 9:11 UTC (permalink / raw)
To: Claudiu Manoil, David S. Miller, Jakub Kicinski, Yangbo Lu,
netdev, linux-kernel
Cc: linmq006
The of_find_compatible_node() function returns a node pointer with
refcount incremented, We should use of_node_put() on it when done
Add the missing of_node_put() to release the refcount.
Fixes: 7349a74ea75c ("net: ethernet: gianfar_ethtool: get phc index through drvdata")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/net/ethernet/freescale/gianfar_ethtool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index ff756265d58f..9a2c16d69e2c 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -1464,6 +1464,7 @@ static int gfar_get_ts_info(struct net_device *dev,
ptp_node = of_find_compatible_node(NULL, NULL, "fsl,etsec-ptp");
if (ptp_node) {
ptp_dev = of_find_device_by_node(ptp_node);
+ of_node_put(ptp_node);
if (ptp_dev)
ptp = platform_get_drvdata(ptp_dev);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] ethtool: Fix refcount leak in gfar_get_ts_info
2022-03-09 9:11 [PATCH] ethtool: Fix refcount leak in gfar_get_ts_info Miaoqian Lin
@ 2022-03-09 20:19 ` Jesse Brandeburg
2022-03-10 1:53 ` [PATCH net v2] gianfar: " Miaoqian Lin
2022-03-10 20:30 ` [PATCH] " patchwork-bot+netdevbpf
1 sibling, 1 reply; 7+ messages in thread
From: Jesse Brandeburg @ 2022-03-09 20:19 UTC (permalink / raw)
To: Miaoqian Lin, Claudiu Manoil, David S. Miller, Jakub Kicinski,
Yangbo Lu, netdev, linux-kernel
> Subject: [PATCH] ethtool: Fix refcount leak in gfar_get_ts_info
should be:
[PATCH net v2] gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
On 3/9/2022 1:11 AM, Miaoqian Lin wrote:
> The of_find_compatible_node() function returns a node pointer with
> refcount incremented, We should use of_node_put() on it when done
> Add the missing of_node_put() to release the refcount.
>
> Fixes: 7349a74ea75c ("net: ethernet: gianfar_ethtool: get phc index through drvdata")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> drivers/net/ethernet/freescale/gianfar_ethtool.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
> index ff756265d58f..9a2c16d69e2c 100644
> --- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
> +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
> @@ -1464,6 +1464,7 @@ static int gfar_get_ts_info(struct net_device *dev,
> ptp_node = of_find_compatible_node(NULL, NULL, "fsl,etsec-ptp");
> if (ptp_node) {
> ptp_dev = of_find_device_by_node(ptp_node);
> + of_node_put(ptp_node);
> if (ptp_dev)
> ptp = platform_get_drvdata(ptp_dev);
> }
If you fix the subject and resend a v2, you can add
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net v2] gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
2022-03-09 20:19 ` Jesse Brandeburg
@ 2022-03-10 1:53 ` Miaoqian Lin
2022-03-10 7:23 ` Claudiu Manoil
2022-03-10 20:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 7+ messages in thread
From: Miaoqian Lin @ 2022-03-10 1:53 UTC (permalink / raw)
To: Claudiu Manoil, David S. Miller, Jakub Kicinski, Yangbo Lu,
netdev, linux-kernel
Cc: linmq006
The of_find_compatible_node() function returns a node pointer with
refcount incremented, We should use of_node_put() on it when done
Add the missing of_node_put() to release the refcount.
Fixes: 7349a74ea75c ("net: ethernet: gianfar_ethtool: get phc index through drvdata")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
changes in v2:
- Fix the subject
---
drivers/net/ethernet/freescale/gianfar_ethtool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index ff756265d58f..9a2c16d69e2c 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -1464,6 +1464,7 @@ static int gfar_get_ts_info(struct net_device *dev,
ptp_node = of_find_compatible_node(NULL, NULL, "fsl,etsec-ptp");
if (ptp_node) {
ptp_dev = of_find_device_by_node(ptp_node);
+ of_node_put(ptp_node);
if (ptp_dev)
ptp = platform_get_drvdata(ptp_dev);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [PATCH net v2] gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
2022-03-10 1:53 ` [PATCH net v2] gianfar: " Miaoqian Lin
@ 2022-03-10 7:23 ` Claudiu Manoil
2022-03-10 20:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 7+ messages in thread
From: Claudiu Manoil @ 2022-03-10 7:23 UTC (permalink / raw)
To: Miaoqian Lin, David S. Miller, Jakub Kicinski, Y.B. Lu, netdev,
linux-kernel
> -----Original Message-----
> From: Miaoqian Lin <linmq006@gmail.com>
> Sent: Thursday, March 10, 2022 3:53 AM
> To: Claudiu Manoil <claudiu.manoil@nxp.com>; David S. Miller
> <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Y.B. Lu
> <yangbo.lu@nxp.com>; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Cc: linmq006@gmail.com
> Subject: [PATCH net v2] gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
>
> The of_find_compatible_node() function returns a node pointer with
> refcount incremented, We should use of_node_put() on it when done
> Add the missing of_node_put() to release the refcount.
>
> Fixes: 7349a74ea75c ("net: ethernet: gianfar_ethtool: get phc index through
> drvdata")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> ---
> changes in v2:
> - Fix the subject
> ---
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ethtool: Fix refcount leak in gfar_get_ts_info
2022-03-09 9:11 [PATCH] ethtool: Fix refcount leak in gfar_get_ts_info Miaoqian Lin
2022-03-09 20:19 ` Jesse Brandeburg
@ 2022-03-10 20:30 ` patchwork-bot+netdevbpf
2022-03-10 20:36 ` Jakub Kicinski
1 sibling, 1 reply; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-10 20:30 UTC (permalink / raw)
To: Miaoqian Lin; +Cc: claudiu.manoil, davem, kuba, yangbo.lu, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 9 Mar 2022 09:11:49 +0000 you wrote:
> The of_find_compatible_node() function returns a node pointer with
> refcount incremented, We should use of_node_put() on it when done
> Add the missing of_node_put() to release the refcount.
>
> Fixes: 7349a74ea75c ("net: ethernet: gianfar_ethtool: get phc index through drvdata")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
>
> [...]
Here is the summary with links:
- ethtool: Fix refcount leak in gfar_get_ts_info
https://git.kernel.org/netdev/net/c/2ac5b58e645c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v2] gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
2022-03-10 1:53 ` [PATCH net v2] gianfar: " Miaoqian Lin
2022-03-10 7:23 ` Claudiu Manoil
@ 2022-03-10 20:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-10 20:30 UTC (permalink / raw)
To: Miaoqian Lin; +Cc: claudiu.manoil, davem, kuba, yangbo.lu, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 10 Mar 2022 01:53:13 +0000 you wrote:
> The of_find_compatible_node() function returns a node pointer with
> refcount incremented, We should use of_node_put() on it when done
> Add the missing of_node_put() to release the refcount.
>
> Fixes: 7349a74ea75c ("net: ethernet: gianfar_ethtool: get phc index through drvdata")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> [...]
Here is the summary with links:
- [net,v2] gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
https://git.kernel.org/netdev/net/c/2ac5b58e645c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ethtool: Fix refcount leak in gfar_get_ts_info
2022-03-10 20:30 ` [PATCH] " patchwork-bot+netdevbpf
@ 2022-03-10 20:36 ` Jakub Kicinski
0 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2022-03-10 20:36 UTC (permalink / raw)
To: patchwork-bot+netdevbpf
Cc: Miaoqian Lin, claudiu.manoil, davem, yangbo.lu, netdev, linux-kernel
On Thu, 10 Mar 2022 20:30:10 +0000 patchwork-bot+netdevbpf@kernel.org
wrote:
> Hello:
>
> This patch was applied to netdev/net.git (master)
> by Jakub Kicinski <kuba@kernel.org>:
No, it wasn't. Maybe I forgot to mark this version as Changes Requested
before applying v2.
> On Wed, 9 Mar 2022 09:11:49 +0000 you wrote:
> > The of_find_compatible_node() function returns a node pointer with
> > refcount incremented, We should use of_node_put() on it when done
> > Add the missing of_node_put() to release the refcount.
> >
> > Fixes: 7349a74ea75c ("net: ethernet: gianfar_ethtool: get phc index through drvdata")
> > Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> >
> > [...]
>
> Here is the summary with links:
> - ethtool: Fix refcount leak in gfar_get_ts_info
> https://git.kernel.org/netdev/net/c/2ac5b58e645c
>
> You are awesome, thank you!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-10 20:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09 9:11 [PATCH] ethtool: Fix refcount leak in gfar_get_ts_info Miaoqian Lin
2022-03-09 20:19 ` Jesse Brandeburg
2022-03-10 1:53 ` [PATCH net v2] gianfar: " Miaoqian Lin
2022-03-10 7:23 ` Claudiu Manoil
2022-03-10 20:30 ` patchwork-bot+netdevbpf
2022-03-10 20:30 ` [PATCH] " patchwork-bot+netdevbpf
2022-03-10 20:36 ` Jakub Kicinski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.