summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorjingxian.li <jingxian.li@shopee.com>2025-11-04 17:27:42 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-24 10:30:10 +0100
commita299478ac16fbc6830afe50620251bcf25b0132a (patch)
tree73b60371ba385bec8a25d61e6928f7cfeb0e8a19 /tools
parentee59d88353e8c1ada3e1136aac8216268127b874 (diff)
downloadlinux-a299478ac16fbc6830afe50620251bcf25b0132a.tar.gz
linux-a299478ac16fbc6830afe50620251bcf25b0132a.tar.bz2
linux-a299478ac16fbc6830afe50620251bcf25b0132a.zip
Revert "perf dso: Add missed dso__put to dso__load_kcore"
This reverts commit e5de9ea7796e79f3cd082624f788cc3442bff2a8. The patch introduced `map__zput(new_node->map)` in the kcore load path, causing a segmentation fault when running `perf c2c report`. The issue arises because `maps__merge_in` directly modifies and inserts the caller's `new_map`, causing it to be freed prematurely while still referenced by kmaps. Later branchs (6.12, 6.15, 6.16) are not affected because they use a different merge approach with a lazily sorted array, which avoids modifying the original `new_map`. Fixes: e5de9ea7796e ("perf dso: Add missed dso__put to dso__load_kcore") Signed-off-by: jingxian.li <jingxian.li@shopee.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/symbol.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 4f0bbebcb6d6..ea24f21aafc3 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1366,7 +1366,6 @@ static int dso__load_kcore(struct dso *dso, struct map *map,
goto out_err;
}
}
- map__zput(new_node->map);
free(new_node);
}