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
+++ linux/arch/i386/kernel/cpu/common.c Fri Aug 30 10:27:08 2002
@@ -454,7 +454,7 @@
/*
* 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
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:30 EST