X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fx86_64%2Fkernel%2Fldt-xen.c;fp=arch%2Fx86_64%2Fkernel%2Fldt-xen.c;h=08ee207a54389b8132e9a86e580e658de57de86b;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=6efbb64f8022e11067fc188f2355f5081e47e320;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/arch/x86_64/kernel/ldt-xen.c b/arch/x86_64/kernel/ldt-xen.c index 6efbb64f8..08ee207a5 100644 --- a/arch/x86_64/kernel/ldt-xen.c +++ b/arch/x86_64/kernel/ldt-xen.c @@ -64,6 +64,7 @@ static int alloc_ldt(mm_context_t *pc, unsigned mincount, int reload) cpumask_t mask; preempt_disable(); + mask = cpumask_of_cpu(smp_processor_id()); #endif make_pages_readonly( pc->ldt, @@ -71,7 +72,6 @@ static int alloc_ldt(mm_context_t *pc, unsigned mincount, int reload) XENFEAT_writable_descriptor_tables); load_LDT(pc); #ifdef CONFIG_SMP - mask = cpumask_of_cpu(smp_processor_id()); if (!cpus_equal(current->mm->cpu_vm_mask, mask)) smp_call_function(flush_ldt, NULL, 1, 1); preempt_enable(); @@ -114,6 +114,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) memset(&mm->context, 0, sizeof(mm->context)); init_MUTEX(&mm->context.sem); + mm->context.size = 0; old_mm = current->mm; if (old_mm && old_mm->context.size > 0) { down(&old_mm->context.sem);