[PATCH 2/3] multiboot: Fix length computation for the memory zones
Sylvain Munaut
s.munaut at whatever-company.com
Fri Aug 26 05:46:15 PDT 2016
Signed-off-by: Sylvain Munaut <s.munaut at whatever-company.com>
---
kexec/arch/i386/kexec-multiboot-x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kexec/arch/i386/kexec-multiboot-x86.c b/kexec/arch/i386/kexec-multiboot-x86.c
index 0dbac70..4de237c 100644
--- a/kexec/arch/i386/kexec-multiboot-x86.c
+++ b/kexec/arch/i386/kexec-multiboot-x86.c
@@ -252,7 +252,7 @@ int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len,
mmap = xmalloc(ranges * sizeof(*mmap));
for (i=0; i<ranges; i++) {
unsigned long long length;
- length = range[i].end - range[i].start;
+ length = range[i].end - range[i].start + 1;
/* Translate bzImage mmap to multiboot-speak */
mmap[i].size = sizeof(mmap[i]) - 4;
mmap[i].base_addr_low = range[i].start & 0xffffffff;
--
2.1.4
More information about the kexec
mailing list