Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] makedumpfile: call initial before use cache
@ 2024-06-25  1:57 Lichen Liu
  2024-07-17  7:44 ` HAGIO KAZUHITO(萩尾 一仁)
  0 siblings, 1 reply; 6+ messages in thread
From: Lichen Liu @ 2024-06-25  1:57 UTC (permalink / raw)
  To: kexec, k-hagio-ab; +Cc: Lichen Liu

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@redhat.com>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-26  0:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25  1:57 [PATCH] makedumpfile: call initial before use cache Lichen Liu
2024-07-17  7:44 ` HAGIO KAZUHITO(萩尾 一仁)
2024-07-20  7:38   ` Lichen Liu
2024-07-22  6:46     ` HAGIO KAZUHITO(萩尾 一仁)
2024-07-23  7:31       ` Lichen Liu
2024-07-26  0:05         ` HAGIO KAZUHITO(萩尾 一仁)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox