kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	david@redhat.com
Subject: [PATCH v2 02/15] KVM: x86: mmu: free_page can handle NULL
Date: Thu, 24 Aug 2017 20:51:24 +0200	[thread overview]
Message-ID: <20170824185137.6253-3-david@redhat.com> (raw)
In-Reply-To: <20170824185137.6253-1-david@redhat.com>

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
 arch/x86/kvm/mmu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index e29ab2e762bb..26ae7d9a6314 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -4931,8 +4931,7 @@ EXPORT_SYMBOL_GPL(kvm_disable_tdp);
 static void free_mmu_pages(struct kvm_vcpu *vcpu)
 {
 	free_page((unsigned long)vcpu->arch.mmu.pae_root);
-	if (vcpu->arch.mmu.lm_root != NULL)
-		free_page((unsigned long)vcpu->arch.mmu.lm_root);
+	free_page((unsigned long)vcpu->arch.mmu.lm_root);
 }
 
 static int alloc_mmu_pages(struct kvm_vcpu *vcpu)
-- 
2.13.5

  parent reply	other threads:[~2017-08-24 18:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 18:51 [PATCH v2 00/15] KVM x86/VMX cleanups David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 01/15] KVM: x86: mmu: returning void in a void function is strange David Hildenbrand
2017-08-24 18:51 ` David Hildenbrand [this message]
2017-08-24 18:51 ` [PATCH v2 03/15] KVM: x86: drop BUG_ON(vcpu->kvm) David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 04/15] KVM: VMX: vmx_vcpu_setup() cannot fail David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 05/15] KVM: x86: no need to inititalize vcpu members to 0 David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 06/15] KVM: VMX: drop enable_ept check from ept_sync_context() David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 07/15] KVM: VMX: call ept_sync_global() with enable_ept only David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 08/15] KVM: VMX: require INVEPT GLOBAL for EPT David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 09/15] KVM: VMX: drop unnecessary function declarations David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 10/15] KVM: nVMX: no need to set vcpu->cpu when switching vmcs David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 11/15] KVM: nVMX: no need to set ept/vpid caps to 0 David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 12/15] KVM: VMX: cleanup init_rmode_identity_map() David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 13/15] KVM: x86: document special identity map address value David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 14/15] KVM: x86: allow setting identity map addr with no vcpus only David Hildenbrand
2017-08-24 18:51 ` [PATCH v2 15/15] KVM: VMX: rename RDSEED and RDRAND vmx ctrls to reflect exiting David Hildenbrand
2017-08-24 20:39   ` Jim Mattson
2017-08-28 14:55     ` David Hildenbrand
2017-08-28 15:50       ` Jim Mattson
2017-09-19 12:42 ` [PATCH v2 00/15] KVM x86/VMX cleanups David Hildenbrand
2017-09-19 12:57   ` Paolo Bonzini
2017-10-06 18:11 ` Radim Krčmář

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170824185137.6253-3-david@redhat.com \
    --to=david@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).