From: Lichen Liu <lichliu@redhat.com>
To: kexec@lists.infradead.org, k-hagio-ab@nec.com
Cc: Lichen Liu <lichliu@redhat.com>
Subject: [PATCH] makedumpfile: call initial before use cache
Date: Tue, 25 Jun 2024 09:57:12 +0800 [thread overview]
Message-ID: <20240625015712.3266086-1-lichliu@redhat.com> (raw)
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
next reply other threads:[~2024-06-25 1:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 1:57 Lichen Liu [this message]
2024-07-17 7:44 ` [PATCH] makedumpfile: call initial before use cache 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(萩尾 一仁)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240625015712.3266086-1-lichliu@redhat.com \
--to=lichliu@redhat.com \
--cc=k-hagio-ab@nec.com \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox