]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf dso: Add missed dso__put to dso__load_kcore
authorIan Rogers <irogers@google.com>
Tue, 24 Jun 2025 19:03:21 +0000 (12:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:08:53 +0000 (12:08 +0200)
commite5de9ea7796e79f3cd082624f788cc3442bff2a8
tree72733c83a7c3cd33ca4b77eff2d24193521b4001
parent9fe9f94599517dab44bef9fe6d79c9b0cab4e35b
perf dso: Add missed dso__put to dso__load_kcore

[ Upstream commit 63a088e999de3f431f87d9a367933da894ddb613 ]

The kcore loading creates a set of list nodes that have reference
counted references to maps of the kcore. The list node freeing in the
success path wasn't releasing the maps, add the missing puts. It is
unclear why this leak was being missed by leak sanitizer.

Fixes: 83720209961f ("perf map: Move map list node into symbol")
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250624190326.2038704-2-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/util/symbol.c