diff options
author | iap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk> | 2005-08-17 22:01:24 +0000 |
---|---|---|
committer | iap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk> | 2005-08-17 22:01:24 +0000 |
commit | d245fc4186f6dc49147e2b85927bf19865264502 (patch) | |
tree | bacaacdda86e93bfd5854b0416c0cdaa09521f04 | |
parent | 7501cca88550678b632d3a0934295c4eb3012bf5 (diff) | |
download | xen-d245fc4186f6dc49147e2b85927bf19865264502.tar.gz xen-d245fc4186f6dc49147e2b85927bf19865264502.tar.bz2 xen-d245fc4186f6dc49147e2b85927bf19865264502.zip |
Fix e820 array stack overflow
I don't see the problem on machine that I typically use, but I found and
fixed the problem on a big machine. It was causing a stack overflow. If
you look at the current code, it's a bit dangerous, see => part. This
patch fixes it.
From: "Nakajima, Jun" <jun.nakajima@intel.com>
Signed-off-by: ian@xensource.com
-rw-r--r-- | xen/arch/x86/setup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 070a9127b2..6c5adf5ca0 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -244,6 +244,8 @@ static void __init start_of_day(void) #define EARLY_FAIL() for ( ; ; ) __asm__ __volatile__ ( "hlt" ) +static struct e820entry e820_raw[E820MAX]; + void __init __start_xen(multiboot_info_t *mbi) { char *cmdline; @@ -253,7 +255,6 @@ void __init __start_xen(multiboot_info_t *mbi) unsigned long _initrd_start = 0, _initrd_len = 0; unsigned int initrdidx = 1; physaddr_t s, e; - struct e820entry e820_raw[E820MAX]; int i, e820_raw_nr = 0, bytes = 0; struct ns16550_defaults ns16550 = { .data_bits = 8, |