a5bd9f6
From 092f6d440ed6015b5216e4eda1e8adeb9922d064 Mon Sep 17 00:00:00 2001
a5bd9f6
From: Colin Watson <cjwatson@ubuntu.com>
a5bd9f6
Date: Sun, 20 Jan 2013 23:03:35 +0000
a5bd9f6
Subject: [PATCH 122/364] * grub-core/loader/i386/linux.c (grub_cmd_initrd):
a5bd9f6
 Don't add the initrd size to addr_min, since the initrd will be allocated
a5bd9f6
 after this address.
a5bd9f6
a5bd9f6
---
a5bd9f6
 ChangeLog                     | 6 ++++++
a5bd9f6
 grub-core/loader/i386/linux.c | 3 +--
a5bd9f6
 2 files changed, 7 insertions(+), 2 deletions(-)
a5bd9f6
a5bd9f6
diff --git a/ChangeLog b/ChangeLog
a5bd9f6
index 4c21ea0..6886f29 100644
a5bd9f6
--- a/ChangeLog
a5bd9f6
+++ b/ChangeLog
a5bd9f6
@@ -1,3 +1,9 @@
a5bd9f6
+2013-01-20  Colin Watson  <cjwatson@ubuntu.com>
a5bd9f6
+
a5bd9f6
+	* grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't add the
a5bd9f6
+	initrd size to addr_min, since the initrd will be allocated after
a5bd9f6
+	this address.
a5bd9f6
+
a5bd9f6
 2013-01-20  Andrey Borzenkov <arvidjaar@gmail.com>
a5bd9f6
 
a5bd9f6
 	* conf/Makefile.common: Fix autogen rules to pass definition
a5bd9f6
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
a5bd9f6
index 41357a5..92cabfb 100644
a5bd9f6
--- a/grub-core/loader/i386/linux.c
a5bd9f6
+++ b/grub-core/loader/i386/linux.c
a5bd9f6
@@ -1115,8 +1115,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
a5bd9f6
      worse than that of Linux 2.3.xx, so avoid the last 64kb.  */
a5bd9f6
   addr_max -= 0x10000;
a5bd9f6
 
a5bd9f6
-  addr_min = (grub_addr_t) prot_mode_target + prot_init_space
a5bd9f6
-             + page_align (size);
a5bd9f6
+  addr_min = (grub_addr_t) prot_mode_target + prot_init_space;
a5bd9f6
 
a5bd9f6
   /* Put the initrd as high as possible, 4KiB aligned.  */
a5bd9f6
   addr = (addr_max - size) & ~0xFFF;
a5bd9f6
-- 
a5bd9f6
1.8.1.4
a5bd9f6