[RHEL7,COMMIT] kvm: fix struct kvm leak on VM stop in mmu_shrink_scan()

Submitted by Konstantin Khorenko on Dec. 9, 2019, 4:29 p.m.


Message ID 201912091629.xB9GToQP031463@finist-ce7.sw.ru
State New
Headers show

Patch hide | download patch | download mbox

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 1f6040bc76f5..5cbd5e9f50d8 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -5877,7 +5877,6 @@  mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
-		kvm_get_kvm(kvm);
 		 * If try_get fails, we race with last kvm_put_kvm(),
 		 * so skip the VM, it will die soon anyway.