🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Yige Jiang Mon, 23 Nov 2026 16:31
[PATCH net] net: ti: icssm-prueth: Retain port node references until remove
#21161
Author: Yige Jiang
Date: Mon, 23 Nov 2026 16:31
40 lines
12532 bytes
icssm_prueth_probe() takes a reference to each available port node and
stores the nodes in prueth->eth_node[]. Those references are released
both at the end of a successful probe and in icssm_prueth_remove(), leaving
one excess put per port after unbinding the driver.

Keep the references after a successful probe, since the stored nodes are
used during teardown. The existing remove path and probe error path then
each release the references only when they own them.

Fixes: 511f6c1ae093 ("net: ti: icssm-prueth: Adds ICSSM Ethernet driver")
Signed-off-by: Yige Jiang <yigejiang86@gmail.com>
---
AI assistance was used for analysis and patch preparation.

Based on next-20261104 (8b7179210b22).
Compile-tested: arm64, GCC 14.2.0, W=1, drivers/net/ethernet/ti/icssm/icssm_prueth.o;
baseline and patched objects built with no warnings.
Static source review; no hardware, boot, or KASAN test was performed.

 drivers/net/ethernet/ti/icssm/icssm_prueth.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/ti/icssm/icssm_prueth.c b/drivers/net/ethernet/ti/icssm/icssm_prueth.c
index b42c98e861e081d6c616881786b94e8bcde6b944..4f9529e0e404fd9cfee9e7340f2f048442ab938a 100644
--- a/drivers/net/ethernet/ti/icssm/icssm_prueth.c
+++ b/drivers/net/ethernet/ti/icssm/icssm_prueth.c
@@ -2018,10 +2018,6 @@ static int icssm_prueth_probe(struct platform_device *pdev)
 	dev_info(dev, "TI PRU ethernet driver initialized: %s EMAC mode\n",
 		 (!eth0_node || !eth1_node) ? "single" : "dual");
 
-	if (eth1_node)
-		of_node_put(eth1_node);
-	if (eth0_node)
-		of_node_put(eth0_node);
 	return 0;
 
 netdev_unregister:

base-commit: 8b7179210b22f8e48a82c5ceacb9d56a9c4cfec4
Re: [PATCH net] net: ti: icssm-prueth: Retain port node references until remove
#22941
Author: Parvathi Pudi
Date: Thu, 26 Nov 2026 07:57
52 lines
12923 bytes
Hi,

> icssm_prueth_probe() takes a reference to each available port node and
> stores the nodes in prueth->eth_node[]. Those references are released
> both at the end of a successful probe and in icssm_prueth_remove(), leaving
> one excess put per port after unbinding the driver.
> 
> Keep the references after a successful probe, since the stored nodes are
> used during teardown. The existing remove path and probe error path then
> each release the references only when they own them.
> 
> Fixes: 511f6c1ae093 ("net: ti: icssm-prueth: Adds ICSSM Ethernet driver")
> Signed-off-by: Yige Jiang <yigejiang86@gmail.com>
> ---
> AI assistance was used for analysis and patch preparation.
> 
> Based on next-20261104 (8b7179210b22).
> Compile-tested: arm64, GCC 14.2.0, W=1,
> drivers/net/ethernet/ti/icssm/icssm_prueth.o;
> baseline and patched objects built with no warnings.
> Static source review; no hardware, boot, or KASAN test was performed.
> 
> drivers/net/ethernet/ti/icssm/icssm_prueth.c | 4 ----
> 1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/ti/icssm/icssm_prueth.c
> b/drivers/net/ethernet/ti/icssm/icssm_prueth.c
> index
> b42c98e861e081d6c616881786b94e8bcde6b944..4f9529e0e404fd9cfee9e7340f2f048442ab938a
> 100644
> --- a/drivers/net/ethernet/ti/icssm/icssm_prueth.c
> +++ b/drivers/net/ethernet/ti/icssm/icssm_prueth.c
> @@ -2018,10 +2018,6 @@ static int icssm_prueth_probe(struct platform_device
> *pdev)
> 	dev_info(dev, "TI PRU ethernet driver initialized: %s EMAC mode\n",
> 		 (!eth0_node || !eth1_node) ? "single" : "dual");
> 
> -	if (eth1_node)
> -		of_node_put(eth1_node);
> -	if (eth0_node)
> -		of_node_put(eth0_node);
> 	return 0;
> 
> netdev_unregister:
> 
> base-commit: 8b7179210b22f8e48a82c5ceacb9d56a9c4cfec4

Reviewed-by: Parvathi Pudi <parvathi@couthit.com>

Thanks and Regards,
Parvathi.
Re: [PATCH net] net: ti: icssm-prueth: Retain port node references until remove
#24930
Author: patchwork-bot+netdevbpf
Date: Tue, 01 Dec 2026 03:00
26 lines
8895 bytes
Hello:

This patch was applied to netdev/net-next.git (main)
by Willem de Bruijn <willemb@google.com>:

On Tue, 24 Nov 2026 00:31:30 +0800 you wrote:
> icssm_prueth_probe() takes a reference to each available port node and
> stores the nodes in prueth->eth_node[]. Those references are released
> both at the end of a successful probe and in icssm_prueth_remove(), leaving
> one excess put per port after unbinding the driver.
> 
> Keep the references after a successful probe, since the stored nodes are
> used during teardown. The existing remove path and probe error path then
> each release the references only when they own them.
> 
> [...]

Here is the summary with links:
  - [net] net: ti: icssm-prueth: Retain port node references until remove
    https://git.kernel.org/netdev/net-next/c/48566dcaaee0

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

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads