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 <[EMAIL PROTECTED]>
---
diff -rpuN a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
--- a/kexec/arch/i386/crashdump-x86.c   2007-11-13 18:06:05.000000000 +0900
+++ b/kexec/arch/i386/crashdump-x86.c   2007-11-13 18:13:09.000000000 +0900
@@ -496,7 +496,7 @@ static enum coretype get_core_type(struc
                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;
_



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

Reply via email to