]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/i386/kernel/smpboot.c
[PATCH] x86: GDT alignment fix
[net-next-2.6.git] / arch / i386 / kernel / smpboot.c
index 9ed449af8e9fdd350a42ff2c606c0af154dad875..b3c2e2c26743381e5f1a8b3dfd592c2c0cb5d2c9 100644 (file)
@@ -903,6 +903,12 @@ static int __devinit do_boot_cpu(int apicid, int cpu)
        unsigned long start_eip;
        unsigned short nmi_high = 0, nmi_low = 0;
 
+       if (!cpu_gdt_descr[cpu].address &&
+           !(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) {
+               printk("Failed to allocate GDT for CPU %d\n", cpu);
+               return 1;
+       }
+
        ++cpucount;
 
        /*