[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1235785882-17580-6-git-send-email-jeremy@goop.org>
Date: Fri, 27 Feb 2009 17:51:22 -0800
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: the arch/x86 maintainers <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: [PATCH] x86: leave _brk_end defined
From: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
highmap_end_pfn refers to _brk_end, so leave it as normal data with a
meaningful value. Make extend_brk() check for a NULL _brk_start to
look for uses after the brk memory has been reserved and locked down.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
---
arch/x86/kernel/setup.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 1d4fe19..11c4198 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -116,7 +116,7 @@ unsigned int boot_cpu_id __read_mostly;
extern char __brk_base[];
__initdata unsigned long _brk_start = (unsigned long)__brk_base;
-__initdata unsigned long _brk_end = (unsigned long)&__brk_base;
+unsigned long _brk_end = (unsigned long)&__brk_base;
#ifdef CONFIG_X86_64
int default_cpu_present_to_apicid(int mps_cpu)
@@ -337,6 +337,7 @@ void * __init extend_brk(size_t size, size_t align)
size_t mask = align - 1;
void *ret;
+ BUG_ON(_brk_start == 0);
BUG_ON(align & mask);
_brk_end = (_brk_end + mask) & ~mask;
@@ -352,7 +353,7 @@ static void __init reserve_brk(void)
if (_brk_end > _brk_start)
reserve_early(__pa(_brk_start), __pa(_brk_end), "BRK");
- _brk_end = _brk_start = 0xdeadb00c + POISON_POINTER_DELTA;
+ _brk_start = 0;
}
static void __init reserve_initrd(void)
--
1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists