Commit e05ef9bdb899e2f3798be74691842fc597d8ce60

Authored by Christian Borntraeger
Committed by Martin Schwidefsky
1 parent 376ae4752e

[S390] kvm: Fix badness at include/asm/mmu_context.h:83

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>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

arch/s390/mm/pgtable.c
... ... @@ -449,6 +449,8 @@
449 449 tsk->mm = tsk->active_mm = mm;
450 450 preempt_disable();
451 451 update_mm(mm, tsk);
  452 + atomic_inc(&mm->context.attach_count);
  453 + atomic_dec(&old_mm->context.attach_count);
452 454 cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm));
453 455 preempt_enable();
454 456 task_unlock(tsk);