summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorManush Prajwal <manushprajwal555@gmail.com>2026-08-21 15:37:14 +0530
committerJakub Kicinski <kuba@kernel.org>2026-08-24 11:58:22 -0700
commit5c07193ebe4718f71752c11d30cf389fa7b4c870 (patch)
treea18767ce8238482db7f3e3f7c77a0cf2059318c8 /tools/perf/scripts/python/stackcollapse.py
parent01ba856c3604ec01c83619a05c2d405f7532a7b0 (diff)
net: ethernet: renesas: rswitch: fix device_node refcount leak in rswitch_get_port_node()
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. Signed-off-by: Manush Prajwal <manushprajwal555@gmail.com> Link: https://patch.msgid.link/6a882352.ee10049a.267d65.7a31@mx.google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions