[patch 4/5] x86: use BOOTMEM_EXCLUSIVE on 32-bit

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <stable@...>
Cc: Justin Forbes <jmforbes@...>, Zwane Mwaikambo <zwane@...>, Theodore Ts'o <tytso@...>, Randy Dunlap <rdunlap@...>, Dave Jones <davej@...>, Chuck Wolber <chuckw@...>, Chris Wedgwood <reviews@...>, Michael Krufky <mkrufky@...>, Chuck Ebbert <cebbert@...>, Domenico Andreoli <cavokz@...>, Willy Tarreau <w@...>, Rodrigo Rubira Branco <rbranco@...>, <torvalds@...>, <akpm@...>, <alan@...>, Bernhard Walle <bwalle@...>, Ingo Molnar <mingo@...>
Date: Sunday, June 22, 2008 - 3:01 pm

2.6.25-stable review patch.  If anyone has any objections, please let us
know.

------------------
From: Bernhard Walle <bwalle@suse.de>

commit d3942cff620bea073fc4e3c8ed878eb1e84615ce upstream

This patch uses the BOOTMEM_EXCLUSIVE for crashkernel reservation also for
i386 and prints a error message on failure.

The patch is still for 2.6.26 since it is only bug fixing. The unification
of reserve_crashkernel() between i386 and x86_64 should be done for 2.6.27.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/setup_32.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -483,10 +483,16 @@ static void __init reserve_crashkernel(v
 					(unsigned long)(crash_size >> 20),
 					(unsigned long)(crash_base >> 20),
 					(unsigned long)(total_mem >> 20));
+
+			if (reserve_bootmem(crash_base, crash_size,
+					BOOTMEM_EXCLUSIVE) < 0) {
+				printk(KERN_INFO "crashkernel reservation "
+					"failed - memory is in use\n");
+				return;
+			}
+
 			crashk_res.start = crash_base;
 			crashk_res.end   = crash_base + crash_size - 1;
-			reserve_bootmem(crash_base, crash_size,
-					BOOTMEM_DEFAULT);
 		} else
 			printk(KERN_INFO "crashkernel reservation failed - "
 					"you have to specify a base address\n");

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 0/5] 2.6.25-stable review, Greg KH, (Sun Jun 22, 3:01 pm)
Re: [patch 0/5] 2.6.25-stable review, S.Çağlar, (Mon Jun 23, 7:19 am)
Re: [stable] [patch 0/5] 2.6.25-stable review, Greg KH, (Mon Jun 23, 3:30 pm)
[patch 4/5] x86: use BOOTMEM_EXCLUSIVE on 32-bit, Greg KH, (Sun Jun 22, 3:01 pm)
Re: [patch 4/5] x86: use BOOTMEM_EXCLUSIVE on 32-bit, Johannes Weiner, (Sun Jun 22, 4:22 pm)
Re: [patch 4/5] x86: use BOOTMEM_EXCLUSIVE on 32-bit, Linus Torvalds, (Sun Jun 22, 4:36 pm)
Re: [patch 4/5] x86: use BOOTMEM_EXCLUSIVE on 32-bit, Ingo Molnar, (Mon Jun 23, 4:09 am)
Re: [patch 4/5] x86: use BOOTMEM_EXCLUSIVE on 32-bit, Bernhard Walle, (Mon Jun 23, 6:33 am)
Re: [patch 4/5] x86: use BOOTMEM_EXCLUSIVE on 32-bit, Ingo Molnar, (Mon Jun 23, 6:53 am)
Re: [patch 4/5] x86: use BOOTMEM_EXCLUSIVE on 32-bit, Bernhard Walle, (Mon Jun 23, 9:21 am)
Re: [patch 4/5] x86: use BOOTMEM_EXCLUSIVE on 32-bit, Adrian Bunk, (Sun Jun 22, 4:36 pm)