Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc4529efc7b730b596d9c7d5a917c00a357e92aa
Commit:     cc4529efc7b730b596d9c7d5a917c00a357e92aa
Parent:     697fe2e24ac49f03a82f6cfe5d77f7a2122ff382
Author:     Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 5 16:36:47 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Jan 5 23:55:25 2007 -0800

    [PATCH] KVM: MMU: kvm_mmu_put_page() only removes one link to the page
    
    ...  and so must not free it unconditionally.
    
    Move the freeing to kvm_mmu_zap_page().
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
    Acked-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/kvm/mmu.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 7e20dbf..d788866 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -521,10 +521,6 @@ static void kvm_mmu_put_page(struct kvm_vcpu *vcpu,
                             u64 *parent_pte)
 {
        mmu_page_remove_parent_pte(page, parent_pte);
-       kvm_mmu_page_unlink_children(vcpu, page);
-       hlist_del(&page->hash_link);
-       list_del(&page->link);
-       list_add(&page->link, &vcpu->free_pages);
 }
 
 static void kvm_mmu_zap_page(struct kvm_vcpu *vcpu,
@@ -546,6 +542,10 @@ static void kvm_mmu_zap_page(struct kvm_vcpu *vcpu,
                kvm_mmu_put_page(vcpu, page, parent_pte);
                *parent_pte = 0;
        }
+       kvm_mmu_page_unlink_children(vcpu, page);
+       hlist_del(&page->hash_link);
+       list_del(&page->link);
+       list_add(&page->link, &vcpu->free_pages);
 }
 
 static int kvm_mmu_unprotect_page(struct kvm_vcpu *vcpu, gfn_t gfn)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to