From: Christian Borntraeger Date: Mon, 25 Oct 2010 14:10:45 +0000 (+0200) Subject: [S390] kvm: Fix badness at include/asm/mmu_context.h:83 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e05ef9bdb899e2f3798be74691842fc597d8ce60;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [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 Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 19338d228c9..0c719c61972 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -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);