Skip to content

Commit

Permalink
perf maps: Add missing map__set_kmap_maps() when replacing a kernel map
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo authored and Namhyung Kim committed Mar 6, 2025
1 parent 0d11fab commit e0e4e0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/perf/util/maps.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,8 @@ static int __maps__fixup_overlap_and_insert(struct maps *maps, struct map *new)
maps_by_name[ni] = map__get(new);
}

map__set_kmap_maps(new, maps);

check_invariants(maps);
return err;
}
Expand Down

0 comments on commit e0e4e0b

Please sign in to comment.