[S390] kvm: Fix badness at include/asm/mmu_context.h:83
authorChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 25 Oct 2010 14:10:45 +0000 (16:10 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 25 Oct 2010 14:10:20 +0000 (16:10 +0200)
commit 050eef364ad700590a605a0749f825cab4834b1e
    [S390] fix tlb flushing vs. concurrent /proc accesses
broke KVM on s390x. On every schedule a
Badness at include/asm/mmu_context.h:83 appears. s390_enable_sie
replaces the mm on the __running__ task, therefore, we have to
increase the attach count of the new mm.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/pgtable.c

index 19338d2..0c719c6 100644 (file)
@@ -449,6 +449,8 @@ int s390_enable_sie(void)
        tsk->mm = tsk->active_mm = mm;
        preempt_disable();
        update_mm(mm, tsk);
+       atomic_inc(&mm->context.attach_count);
+       atomic_dec(&old_mm->context.attach_count);
        cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm));
        preempt_enable();
        task_unlock(tsk);