diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-05 22:16:21 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-05 22:16:21 +0200 |
commit | 6bc51545da17614c3fd0fc782c0847c154a2c207 (patch) | |
tree | c3a3868ba013384c421540d135581c2b4d469749 /arch | |
parent | Merge branch 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
parent | KVM: MMU: fix shrinking page from the empty mmu (diff) | |
download | linux-6bc51545da17614c3fd0fc782c0847c154a2c207.tar.xz linux-6bc51545da17614c3fd0fc782c0847c154a2c207.zip |
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); |