diff options
author | Avi Kivity <avi@qumranet.com> | 2008-03-23 15:21:08 +0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-03-25 11:22:17 +0300 |
commit | e48bb497b95a0f7127f9ff596a6b4c4b206f7dcf (patch) | |
tree | ed08b92975bdec1e482ee883040148580d3cf8ab /arch/x86/kvm | |
parent | 707a18a51d83d9180a63b3cbaad8eda7764a8689 (diff) | |
download | linux-e48bb497b95a0f7127f9ff596a6b4c4b206f7dcf.tar.xz |
KVM: MMU: Fix memory leak on guest demand faults
While backporting 72dc67a69690288538142df73a7e3ac66fea68dc, a gfn_to_page()
call was duplicated instead of moved (due to an unrelated patch not being
present in mainline). This caused a page reference leak, resulting in a
fairly massive memory leak.
Fix by removing the extraneous gfn_to_page() call.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 4ba85d95bd29..e55af12e11b7 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1412,7 +1412,7 @@ static void mmu_guess_page_from_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, up_read(¤t->mm->mmap_sem); vcpu->arch.update_pte.gfn = gfn; - vcpu->arch.update_pte.page = gfn_to_page(vcpu->kvm, gfn); + vcpu->arch.update_pte.page = page; } void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, |