From b41eacb1069eeefd630d807b1587247e6d89628c Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Tue, 13 Nov 2007 19:29:16 +0900 Subject: Fix the feature determining ELF32/ELF64 automatically Hi, This patch fixes the problem that the kexec command cannot determine ELF32/ELF64 automatically. On i386 system, the kexec command always determined an ELF32 /proc/vmcore even if the memory is 4GB or larger, because of referring the outside of the array "range[]". Thanks Ken'ichi Ohmichi Signed-off-by: Ken'ichi Ohmichi Signed-off-by: Simon Horman --- kexec/arch/i386/crashdump-x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c index 729ce00..60bd8c5 100644 --- a/kexec/arch/i386/crashdump-x86.c +++ b/kexec/arch/i386/crashdump-x86.c @@ -496,7 +496,7 @@ static enum coretype get_core_type(struct kexec_info *info, if (ranges == 0) return CORE_TYPE_ELF64; - if (range[ranges].end > 0xFFFFFFFFUL) + if (range[ranges - 1].end > 0xFFFFFFFFUL) return CORE_TYPE_ELF64; else return CORE_TYPE_ELF32; -- cgit