[PATCH 2/3] multiboot: Fix length computation for the memory zones

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux