All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] bus: arm-cci: Drop CPU node reference in cci_ace_init_ports()
@ 2026-09-23 16:35 Yuho Choi
  2026-10-13 16:10 ` patchwork-bot+linux-soc
  0 siblings, 1 reply; 2+ messages in thread
From: Yuho Choi @ 2026-09-23 16:35 UTC (permalink / raw)
  To: Sudeep Holla, Arnd Bergmann
  Cc: Nicolas Pitre, linux-arm-kernel, soc, linux-kernel, Yuho Choi

cci_ace_init_ports() looks up each possible CPU's node with
of_get_cpu_node(), which returns the node with its reference count
raised, but never releases it: neither when the CPU has no ACE port nor
after the port has been recorded.  Before the commit below the loop used
for_each_child_of_node(), which manages the references itself.

The node is only needed for the port lookup, so drop the reference right
after __cci_ace_get_port().

Fixes: 78b4d6e0fd26 ("drivers/bus: arm-cci: avoid parsing DT for cpu device nodes")
Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
---
Found by code review; compile-tested only (multi_v7_defconfig, W=1).

 drivers/bus/arm-cci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index 7f2baf0571286..076ac8e06bd01 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -199,6 +199,7 @@ static void cci_ace_init_ports(void)
 			continue;
 
 		port = __cci_ace_get_port(cpun, ACE_PORT);
+		of_node_put(cpun);
 		if (port < 0)
 			continue;
 

base-commit: f0100363d8c374bd8e9ea7c9ba02744f0b802ca4
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] bus: arm-cci: Drop CPU node reference in cci_ace_init_ports()
  2026-09-23 16:35 [PATCH v1] bus: arm-cci: Drop CPU node reference in cci_ace_init_ports() Yuho Choi
@ 2026-10-13 16:10 ` patchwork-bot+linux-soc
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+linux-soc @ 2026-10-13 16:10 UTC (permalink / raw)
  To: Yuho Choi; +Cc: soc

Hello:

This patch was applied to soc/soc.git (for-next)
by Arnd Bergmann <arnd@arndb.de>:

On Wed, 23 Sep 2026 12:35:15 -0400 you wrote:
> cci_ace_init_ports() looks up each possible CPU's node with
> of_get_cpu_node(), which returns the node with its reference count
> raised, but never releases it: neither when the CPU has no ACE port nor
> after the port has been recorded.  Before the commit below the loop used
> for_each_child_of_node(), which manages the references itself.
> 
> The node is only needed for the port lookup, so drop the reference right
> after __cci_ace_get_port().
> 
> [...]

Here is the summary with links:
  - [v1] bus: arm-cci: Drop CPU node reference in cci_ace_init_ports()
    https://git.kernel.org/soc/soc/c/41d6c0fcd4d7

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] 2+ messages in thread

end of thread, other threads:[~2026-10-13 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-23 16:35 [PATCH v1] bus: arm-cci: Drop CPU node reference in cci_ace_init_ports() Yuho Choi
2026-10-13 16:10 ` patchwork-bot+linux-soc

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.