From 75e02b4366b94cd2494f0bcad3f51226352ecf1e Mon Sep 17 00:00:00 2001 From: HATAYAMA Daisuke Date: Thu, 25 Oct 2012 19:22:03 +0900 Subject: [PATCH] diskdump: Pass sanity check if nr_cpus member in diskdump header has 0 Currently, if diskdump header has 0 in nr_cpus member, crash regards it as an unsupported file format. But on X86 and X86_64, the number of cpus can be calculated from memory. Both archs should be passed here. Signed-off-by: HATAYAMA Daisuke --- diskdump.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/diskdump.c b/diskdump.c index 39f4652..ac86ee0 100644 --- a/diskdump.c +++ b/diskdump.c @@ -397,7 +397,8 @@ restart: error(WARNING, "%s: invalid nr_cpus value: %d\n", DISKDUMP_VALID() ? "diskdump" : "compressed kdump", header->nr_cpus); - if (!machine_type("S390") && !machine_type("S390X")) { + if (!machine_type("S390") && !machine_type("S390X") && + !machine_type("X86") && !machine_type("X86_64")) { /* s390 can get register information also from memory */ if (DISKDUMP_VALID()) goto err; -- 1.7.7.6