perf maps: Add missing map__set_kmap_maps() when replacing a kernel map

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 <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Link: https://lore.kernel.org/lkml/Z7-May5w9VQd5QD0@x1
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
This commit is contained in:
Arnaldo Carvalho de Melo authored and Namhyung Kim committed 2025-03-05 23:03:43 -08:00
1 parent 0d11fab327
commit e0e4e0b8b7
1 file changed
+2
+2
View File
@@ -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;
}