Patch "KVM: arm/arm64: Don't reschedule in unmap_stage2_range()" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    KVM: arm/arm64: Don't reschedule in unmap_stage2_range()

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-arm-arm64-don-t-reschedule-in-unmap_stage2_range.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From will@xxxxxxxxxx  Mon Aug 24 18:12:22 2020
From: Will Deacon <will@xxxxxxxxxx>
Date: Mon, 24 Aug 2020 12:29:54 +0100
Subject: KVM: arm/arm64: Don't reschedule in unmap_stage2_range()
To: gregkh@xxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, maz@xxxxxxxxxx, suzuki.poulose@xxxxxxx, james.morse@xxxxxxx, pbonzini@xxxxxxxxxx, kernel-team@xxxxxxxxxxx, Will Deacon <will@xxxxxxxxxx>, stable@xxxxxxxxxxxxxxx
Message-ID: <20200824112954.24756-1-will@xxxxxxxxxx>

From: Will Deacon <will@xxxxxxxxxx>

Upstream commits fdfe7cbd5880 ("KVM: Pass MMU notifier range flags to
kvm_unmap_hva_range()") and b5331379bc62 ("KVM: arm64: Only reschedule
if MMU_NOTIFIER_RANGE_BLOCKABLE is not set") fix a "sleeping from invalid
context" BUG caused by unmap_stage2_range() attempting to reschedule when
called on the OOM path.

Unfortunately, these patches rely on the MMU notifier callback being
passed knowledge about whether or not blocking is permitted, which was
introduced in 4.19. Rather than backport this considerable amount of
infrastructure just for KVM on arm, instead just remove the conditional
reschedule.

Cc: <stable@xxxxxxxxxxxxxxx> # v4.14 only
Cc: Marc Zyngier <maz@xxxxxxxxxx>
Cc: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
Cc: James Morse <james.morse@xxxxxxx>
Signed-off-by: Will Deacon <will@xxxxxxxxxx>
Acked-by: Marc Zyngier <maz@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 virt/kvm/arm/mmu.c |    6 ------
 1 file changed, 6 deletions(-)

--- a/virt/kvm/arm/mmu.c
+++ b/virt/kvm/arm/mmu.c
@@ -307,12 +307,6 @@ static void unmap_stage2_range(struct kv
 		next = stage2_pgd_addr_end(addr, end);
 		if (!stage2_pgd_none(*pgd))
 			unmap_stage2_puds(kvm, pgd, addr, next);
-		/*
-		 * If the range is too large, release the kvm->mmu_lock
-		 * to prevent starvation and lockup detector warnings.
-		 */
-		if (next != end)
-			cond_resched_lock(&kvm->mmu_lock);
 	} while (pgd++, addr = next, addr != end);
 }
 


Patches currently in stable-queue which might be from will@xxxxxxxxxx are

queue-4.14/kvm-arm-arm64-don-t-reschedule-in-unmap_stage2_range.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux