ia64/xen-unstable

changeset 5342:03616508a241

bitkeeper revision 1.1686 (42a473f3lFCz32vzD_NzxLZBkAfJ0A)

cpu_gdt_init() could allocate a frame array one element too small. Now
it is fixed size and guaranteed big enough. Spotted by George Dunlap.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jun 06 16:04:03 2005 +0000 (2005-06-06)
parents 4221215e1366
children 86fe63442842 f409e35891f3
files linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup64.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c	Mon Jun 06 15:17:43 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c	Mon Jun 06 16:04:03 2005 +0000
     1.3 @@ -554,7 +554,7 @@ void __init early_cpu_init(void)
     1.4  
     1.5  void __init cpu_gdt_init(struct Xgt_desc_struct *gdt_descr)
     1.6  {
     1.7 -	unsigned long frames[gdt_descr->size >> PAGE_SHIFT];
     1.8 +	unsigned long frames[16];
     1.9  	unsigned long va;
    1.10  	int f;
    1.11  
     2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup64.c	Mon Jun 06 15:17:43 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup64.c	Mon Jun 06 16:04:03 2005 +0000
     2.3 @@ -208,7 +208,7 @@ void __init check_efer(void)
     2.4  
     2.5  void __init cpu_gdt_init(struct desc_ptr *gdt_descr)
     2.6  {
     2.7 -	unsigned long frames[gdt_descr->size >> PAGE_SHIFT];
     2.8 +	unsigned long frames[16];
     2.9  	unsigned long va;
    2.10  	int f;
    2.11