ia64/xen-unstable

changeset 6238:80b0fbf1c4a1

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
author iap10@freefall.cl.cam.ac.uk
date Wed Aug 17 22:01:24 2005 +0000 (2005-08-17)
parents fbdbe4fc218d
children 02789fed726a
files xen/arch/x86/setup.c
line diff
     1.1 --- a/xen/arch/x86/setup.c	Wed Aug 17 18:22:18 2005 +0000
     1.2 +++ b/xen/arch/x86/setup.c	Wed Aug 17 22:01:24 2005 +0000
     1.3 @@ -244,6 +244,8 @@ static void __init start_of_day(void)
     1.4  
     1.5  #define EARLY_FAIL() for ( ; ; ) __asm__ __volatile__ ( "hlt" )
     1.6  
     1.7 +static struct e820entry e820_raw[E820MAX];
     1.8 +
     1.9  void __init __start_xen(multiboot_info_t *mbi)
    1.10  {
    1.11      char *cmdline;
    1.12 @@ -253,7 +255,6 @@ void __init __start_xen(multiboot_info_t
    1.13      unsigned long _initrd_start = 0, _initrd_len = 0;
    1.14      unsigned int initrdidx = 1;
    1.15      physaddr_t s, e;
    1.16 -    struct e820entry e820_raw[E820MAX];
    1.17      int i, e820_raw_nr = 0, bytes = 0;
    1.18      struct ns16550_defaults ns16550 = {
    1.19          .data_bits = 8,