diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-06 00:16:21 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-06 00:16:21 +0400 |
commit | 6bc51545da17614c3fd0fc782c0847c154a2c207 (patch) | |
tree | c3a3868ba013384c421540d135581c2b4d469749 /arch | |
parent | 24eee627eb7b05ac3cbca240f36b615969e65775 (diff) | |
parent | 85b7059169e128c57a3a8a3e588fb89cb2031da1 (diff) | |
download | linux-6bc51545da17614c3fd0fc782c0847c154a2c207.tar.xz |
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fix from Marcelo Tosatti:
"Memory leak and oops on the x86 mmu code, and sanitization of the
KVM_IRQFD ioctl."
* git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: MMU: fix shrinking page from the empty mmu
KVM: fix fault page leak
KVM: Sanitize KVM_IRQFD flags
KVM: Add missing KVM_IRQFD API documentation
KVM: Pass kvm_irqfd to functions
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/mmu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index be3cea4407ff..57e168e27b5b 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -3934,6 +3934,9 @@ static void kvm_mmu_remove_some_alloc_mmu_pages(struct kvm *kvm, { struct kvm_mmu_page *page; + if (list_empty(&kvm->arch.active_mmu_pages)) + return; + page = container_of(kvm->arch.active_mmu_pages.prev, struct kvm_mmu_page, link); kvm_mmu_prepare_zap_page(kvm, page, invalid_list); |