Re: [PATCH v4] net: ethernet: renesas: rswitch: fix device_node refcount leak in rswitch_get_port_node()

[email protected]
Newsgroups org.kernel.vger.linux-renesas-soc,org.kernel.vger.netdev
Message-ID <178759861288.3069565.17735518402578185304.git-patchwork-notify@kernel.org>
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

On 21 Aug 2026 15:37:14 +0530 you wrote:
> On an of_property_read_u32() failure, rswitch_get_port_node() set port
> to NULL and jumped to the out label before releasing the reference the
> for_each_available_child_of_node() iterator was holding on it. Once
> port was overwritten with NULL, that reference could never be
> released since out: only put "ports", the parent node.
> 
> Rework the function around for_each_available_child_of_node_scoped()
> instead of adding a manual of_node_put(), so the iterator's reference
> is dropped automatically on every exit path. Since port is the
> function's return value, take an explicit reference with of_node_get()
> on the match before breaking out of the loop.
> 
> [...]

Here is the summary with links:
  - [v4] net: ethernet: renesas: rswitch: fix device_node refcount leak in rswitch_get_port_node()
    https://git.kernel.org/netdev/net/c/5c07193ebe47

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.