summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMalaya Kumar Rout <mrout@redhat.com>2025-11-20 20:32:13 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-12-01 11:46:00 +0100
commit0bd5502efdab2ca4d41c3dff9460fedc93c11d20 (patch)
treea5daba0ad073cc214c8ca1fc0337f43c7279d13c /tools/perf/scripts/python/stackcollapse.py
parentab6b19f690d89ae4709fba73a3c4a7911f495b7a (diff)
timekeeping: Fix resource leak in tk_aux_sysfs_init() error paths
[ Upstream commit 7b5ab04f035f829ed6008e4685501ec00b3e73c9 ] tk_aux_sysfs_init() returns immediately on error during the auxiliary clock initialization loop without cleaning up previously allocated kobjects and sysfs groups. If kobject_create_and_add() or sysfs_create_group() fails during loop iteration, the parent kobjects (tko and auxo) and any previously created child kobjects are leaked. Fix this by adding proper error handling with goto labels to ensure all allocated resources are cleaned up on failure. kobject_put() on the parent kobjects will handle cleanup of their children. Fixes: 7b95663a3d96 ("timekeeping: Provide interface to control auxiliary clocks") Signed-off-by: Malaya Kumar Rout <mrout@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://patch.msgid.link/20251120150213.246777-1-mrout@redhat.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions