From: Zaslonko Mikhail <zaslonko@linux.vnet.ibm.com>
To: kexec@lists.infradead.org, Michael Holzheu <holzheu@linux.vnet.ibm.com>
Subject: [PATCH] makedumpfile: Error on re-filtering the dump file with no free pages
Date: Wed, 17 May 2017 17:02:24 +0200 [thread overview]
Message-ID: <2d1847a4-0e3c-b282-a3ff-74755716eb69@linux.vnet.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 39 bytes --]
Please find the enclosed patch below.
[-- Attachment #2: 0001-makedumpfile-Error-on-re-filtering-the-dump-file-wit.patch --]
[-- Type: text/plain, Size: 2501 bytes --]
From 627b4c8085269251f6d66627dada447909bceafd Mon Sep 17 00:00:00 2001
From: root <root@s8345025.boeblingen.de.ibm.com>
Date: Tue, 16 May 2017 14:08:14 +0200
Subject: [PATCH] makedumpfile: Error on re-filtering the dump file with no
free pages
When re-filtering the dump file after the free pages have already been
stripped out we get an error "Can't get necessary symbols for excluding
free pages" if newly specified dump level is below 16 (preserves free
pages).
According to the code, the check for the new dump level is done BEFORE
the new dump level is actually set (based on the dump level specified in
the command and the one from the input dump file).
Moving the new_dump_level calculation ahead would fix the error.
Signed-off-by: Mikhail Zaslonko <zaslonko@linux.vnet.ibm.com>
---
makedumpfile.c | 34 ++++++++++++++++++++++------------
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/makedumpfile.c b/makedumpfile.c
index e69b6df..24f99fc 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -9774,10 +9774,25 @@ writeout_multiple_dumpfiles(void)
return ret;
}
+void
+update_dump_level(void)
+{
+ int new_level;
+
+ new_level = info->dump_level | info->kh_memory->dump_level;
+ if (new_level != info->dump_level) {
+ info->dump_level = new_level;
+ MSG("dump_level is changed to %d, " \
+ "because %s was created by dump_level(%d).",
+ new_level, info->name_memory,
+ info->kh_memory->dump_level);
+ }
+}
+
int
create_dumpfile(void)
{
- int num_retry, status, new_level;
+ int num_retry, status;
if (!open_files_for_creating_dumpfile())
return FALSE;
@@ -9786,6 +9801,10 @@ create_dumpfile(void)
if (!get_elf_info(info->fd_memory, info->name_memory))
return FALSE;
}
+
+ if (info->flag_refiltering)
+ update_dump_level();
+
if (!initial())
return FALSE;
@@ -9804,17 +9823,8 @@ create_dumpfile(void)
num_retry = 0;
retry:
- if (info->flag_refiltering) {
- /* Change dump level */
- new_level = info->dump_level | info->kh_memory->dump_level;
- if (new_level != info->dump_level) {
- info->dump_level = new_level;
- MSG("dump_level is changed to %d, " \
- "because %s was created by dump_level(%d).",
- new_level, info->name_memory,
- info->kh_memory->dump_level);
- }
- }
+ if (info->flag_refiltering)
+ update_dump_level();
if ((info->name_filterconfig || info->name_eppic_config)
&& !gather_filter_info())
--
1.8.3.1
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next reply other threads:[~2017-05-17 15:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 15:02 Zaslonko Mikhail [this message]
2017-05-18 4:37 ` [PATCH] makedumpfile: Error on re-filtering the dump file with no free pages Atsushi Kumagai
2017-05-18 12:02 ` Michael Holzheu
2017-05-19 2:35 ` Atsushi Kumagai
2017-05-19 7:27 ` Michael Holzheu
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=2d1847a4-0e3c-b282-a3ff-74755716eb69@linux.vnet.ibm.com \
--to=zaslonko@linux.vnet.ibm.com \
--cc=holzheu@linux.vnet.ibm.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