From 8d0ba03a0377937725aee3bfec34f1a83eb5b1b3 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 1 Aug 2007 14:46:11 +1000 Subject: [PATCH] --- yaml --- r: 68386 b: refs/heads/master c: a477034750ce59df7fc17823f085df5a30e316f0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/kvm/svm.c | 4 ++-- trunk/drivers/kvm/vmx.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index f6201f5b7ddf..b0d9034b889d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f02424785ab83bab8283ad33044284f749c08db8 +refs/heads/master: a477034750ce59df7fc17823f085df5a30e316f0 diff --git a/trunk/drivers/kvm/svm.c b/trunk/drivers/kvm/svm.c index 3ec30d7c9b93..436bdff9b0bf 100644 --- a/trunk/drivers/kvm/svm.c +++ b/trunk/drivers/kvm/svm.c @@ -610,7 +610,7 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) uninit: kvm_vcpu_uninit(&svm->vcpu); free_svm: - kfree(svm); + kmem_cache_free(kvm_vcpu_cache, svm); out: return ERR_PTR(err); } @@ -621,7 +621,7 @@ static void svm_free_vcpu(struct kvm_vcpu *vcpu) __free_page(pfn_to_page(svm->vmcb_pa >> PAGE_SHIFT)); kvm_vcpu_uninit(vcpu); - kfree(svm); + kmem_cache_free(kvm_vcpu_cache, svm); } static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu) diff --git a/trunk/drivers/kvm/vmx.c b/trunk/drivers/kvm/vmx.c index ae54d9a24ce8..708055a50521 100644 --- a/trunk/drivers/kvm/vmx.c +++ b/trunk/drivers/kvm/vmx.c @@ -2359,7 +2359,7 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu) kfree(vmx->host_msrs); kfree(vmx->guest_msrs); kvm_vcpu_uninit(vcpu); - kfree(vmx); + kmem_cache_free(kvm_vcpu_cache, vmx); } static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id) @@ -2410,7 +2410,7 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id) uninit_vcpu: kvm_vcpu_uninit(&vmx->vcpu); free_vcpu: - kfree(vmx); + kmem_cache_free(kvm_vcpu_cache, vmx); return ERR_PTR(err); }