Skip to contentSkip to conversation

makedumpfile: Copy correct nr_cpus info to dumpfile during re-filtering

PATCH In review Mahesh J Salgaonkar 2 participants 2 messages Mar 9, 2011 – Mar 11, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 makedumpfile: Copy correct nr_cpus info to dumpfile during re-filtering

From: Mahesh Salgaonkar <[email protected]>

During re-filtering nr_cpus is to 0 in the o/p dumpfile and hence crash utility fails to open the re-filtered dumpfile.

This patch fixes this issue by copying nr_cpus info from kdump-compressed dumpfile to info->nr_cpus which then get's correctly copied to o/p dumpfile.

---

 makedumpfile.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
makedumpfile.c +1 -0
index a0fad6a..7d0c663 100644
@@ -924,6 +924,7 @@ get_kdump_compressed_header_info(char *filename)
 		goto error;
 	}
 	memcpy(info->kh_memory, &kh, sizeof(kh));
+	info->nr_cpus = dh.nr_cpus;
 
 	if (dh.header_version >= 3) {
 		/* A dumpfile contains vmcoreinfo data. */

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#1 lore raw

Hi Mahesh,

Nice catching!
Your patch has been merged to mainline:
http://makedumpfile.git.sourceforge.net/git/gitweb.cgi?p=makedumpfile/makedumpfile;a=summary

Thank you very much.

Thanks
Ken'ichi Ohmichi

Quoted 22 lines · On Wed, 09 Mar 2011 17:45:48 +0530 Mahesh J Salgaonkar…

From: Mahesh Salgaonkar <[email protected]>

During re-filtering nr_cpus is to 0 in the o/p dumpfile and hence crash utility fails to open the re-filtered dumpfile.

This patch fixes this issue by copying nr_cpus info from kdump-compressed dumpfile to info->nr_cpus which then get's correctly copied to o/p dumpfile.

---

 makedumpfile.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
makedumpfile.c +0 -0
index a0fad6a..7d0c663 100644

makedumpfile.c get_kdump_compressed_header_info(char *filename) · line 930

Quoted 7 lines
makedumpfile.c +1 -0
@@ -924,6 +924,7 @@ get_kdump_compressed_header_info(char *filename)
 		goto error;
 	}
 	memcpy(info->kh_memory, &kh, sizeof(kh));
+	info->nr_cpus = dh.nr_cpus;
 
 	if (dh.header_version >= 3) {
 		/* A dumpfile contains vmcoreinfo data. */

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec