mirror of https://gitee.com/openkylin/linux.git
KVM: x86: mmu: free_page can handle NULL
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
This commit is contained in:
parent
bb606a9b80
commit
87ca74ad92
|
@ -4993,8 +4993,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)
|
||||
|
|
Loading…
Reference in New Issue