Commit 7b4731ff authored by Roland Dreier's avatar Roland Dreier Committed by Linus Torvalds

[PATCH] x86: remove hard-coded numbers from ptr_ok()

Looks like arch/i386/kernel/doublefault.c is one place in the code that
hardcodes the assumption that PAGE_OFFSET == 0xC0000000.  Here's a patch
that fixes that.
Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a12d5822
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
static unsigned long doublefault_stack[DOUBLEFAULT_STACKSIZE]; static unsigned long doublefault_stack[DOUBLEFAULT_STACKSIZE];
#define STACK_START (unsigned long)(doublefault_stack+DOUBLEFAULT_STACKSIZE) #define STACK_START (unsigned long)(doublefault_stack+DOUBLEFAULT_STACKSIZE)
#define ptr_ok(x) ((x) > 0xc0000000 && (x) < 0xc1000000) #define ptr_ok(x) ((x) > PAGE_OFFSET && (x) < PAGE_OFFSET + 0x1000000)
static void doublefault_fn(void) static void doublefault_fn(void)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment