Skip to content

Commit 74dc963

Browse files
committed
perf maps: Add missing map__set_kmap_maps() when replacing a kernel map
JIRA: https://issues.redhat.com/browse/RHEL-78197 upstream ======== commit e0e4e0b Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Feb 28 18:17:33 2025 -0300 description =========== Since in this case __maps__insert_sorted() is not called and thus doesn't have the opportunity to do the needed map__set_kmap_maps() calls on the new map. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/lkml/Z7-May5w9VQd5QD0@x1 Link: https://lore.kernel.org/r/20250228211734.33781-6-acme@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent a1d3411 commit 74dc963

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/perf/util/maps.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,8 @@ static int __maps__fixup_overlap_and_insert(struct maps *maps, struct map *new)
948948
maps_by_name[ni] = map__get(new);
949949
}
950950

951+
map__set_kmap_maps(new, maps);
952+
951953
check_invariants(maps);
952954
return err;
953955
}

0 commit comments

Comments
 (0)