diff options
| author | Zachary Amsden <zach@vmware.com> | 2005-10-30 17:59:33 -0500 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:12 -0500 | 
| commit | 72e12b76fe48d99d1deb417f177b10a9d99b2e74 (patch) | |
| tree | 55bd8ff5d3d641de012fbc26f5cc1c5a40e6d920 | |
| parent | 9f40a72a7e819789f66910c8cd60aab005cdb413 (diff) | |
[PATCH] x86: bogus tls from gdt
The per-CPU initialization code is copying in bogus data into
thread->tls_array.  Note that it copies &per_cpu(cpu_gdt_table, cpu), not
&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN).  That is totally broken
and unnecessary.  Make the initialization explicitly NULL.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | arch/i386/kernel/cpu/common.c | 6 | 
1 files changed, 0 insertions, 6 deletions
| diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 9ad43be9a01f..a162c0326b4a 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
| @@ -607,12 +607,6 @@ void __devinit cpu_init(void) | |||
| 607 | cpu_gdt_descr[cpu].address = | 607 | cpu_gdt_descr[cpu].address = | 
| 608 | (unsigned long)&per_cpu(cpu_gdt_table, cpu); | 608 | (unsigned long)&per_cpu(cpu_gdt_table, cpu); | 
| 609 | 609 | ||
| 610 | /* | ||
| 611 | * Set up the per-thread TLS descriptor cache: | ||
| 612 | */ | ||
| 613 | memcpy(thread->tls_array, &per_cpu(cpu_gdt_table, cpu), | ||
| 614 | GDT_ENTRY_TLS_ENTRIES * 8); | ||
| 615 | |||
| 616 | load_gdt(&cpu_gdt_descr[cpu]); | 610 | load_gdt(&cpu_gdt_descr[cpu]); | 
| 617 | load_idt(&idt_descr); | 611 | load_idt(&idt_descr); | 
| 618 | 612 | ||
