Commit 44a05b3e authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] TLS boot-initialization bugfix on SMP, 2.5.32-BK

This fixes a bad TLS initialization bug found by Andi Kleen.  x86/SMP
only worked due to luck.
parent 2c638ab0
...@@ -454,7 +454,7 @@ void __init cpu_init (void) ...@@ -454,7 +454,7 @@ void __init cpu_init (void)
/* /*
* Set up the per-thread TLS descriptor cache: * 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__("lgdt %0": "=m" (cpu_gdt_descr[cpu]));
__asm__ __volatile__("lidt %0": "=m" (idt_descr)); __asm__ __volatile__("lidt %0": "=m" (idt_descr));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment