TLS boot-initialization bugfix on SMP, 2.5.32-BK

TLS boot-initialization bugfix on SMP, 2.5.32-BK

Post by Ingo Molna » Sat, 31 Aug 2002 17:30:11



the attached (tested) patch fixes a bad TLS initialization bug found by
Andi Kleen. x86/SMP only worked due to luck.

        Ingo

--- linux/arch/i386/kernel/cpu/common.c.orig    Fri Aug 30 10:26:55 2002

        /*
         * Set up the per-thread TLS descriptor cache:
         */
-       memcpy(thread->tls_array, cpu_gdt_table[cpu], GDT_ENTRY_TLS_MAX * 8);
+       memcpy(thread->tls_array, cpu_gdt_table[cpu], GDT_ENTRY_TLS_ENTRIES * 8);

        __asm__ __volatile__("lgdt %0": "=m" (cpu_gdt_descr[cpu]));
        __asm__ __volatile__("lidt %0": "=m" (idt_descr));

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/