Run 'makedumpfile --mem-usage /proc/kcore' will coredump on ppc64, it is because show_mem_usage()->get_page_offset()->get_versiondep_info_ppc64() ->readmem() use cache before it is inited by initial(). Currently only ppc64 has this issue because only get_versiondep_info_ppc64() call readmem(). Signed-off-by: Lichen Liu <lichliu@xxxxxxxxxx> --- makedumpfile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makedumpfile.c b/makedumpfile.c index 5b34712..6a42264 100644 --- a/makedumpfile.c +++ b/makedumpfile.c @@ -12019,6 +12019,9 @@ int show_mem_usage(void) DEBUG_MSG("Read vmcoreinfo from NOTE segment: %d\n", vmcoreinfo); } + if (!initial()) + return FALSE; + if (!get_page_offset()) return FALSE; @@ -12034,9 +12037,6 @@ int show_mem_usage(void) return FALSE; } - if (!initial()) - return FALSE; - if (!open_dump_bitmap()) return FALSE; -- 2.44.0 _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec