Skip to content

Commit 32b9a52

Browse files
Danilo Krummrichoupton
authored andcommitted
KVM: arm64: free kvm->arch.nested_mmus with kvfree()
kvm->arch.nested_mmus is allocated with kvrealloc(), hence free it with kvfree() instead of kfree(). Fixes: 4f128f8 ("KVM: arm64: nv: Support multiple nested Stage-2 mmu structures") Signed-off-by: Danilo Krummrich <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 8400291 commit 32b9a52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/nested.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ void kvm_arch_flush_shadow_all(struct kvm *kvm)
786786
if (!WARN_ON(atomic_read(&mmu->refcnt)))
787787
kvm_free_stage2_pgd(mmu);
788788
}
789-
kfree(kvm->arch.nested_mmus);
789+
kvfree(kvm->arch.nested_mmus);
790790
kvm->arch.nested_mmus = NULL;
791791
kvm->arch.nested_mmus_size = 0;
792792
kvm_uninit_stage2_mmu(kvm);

0 commit comments

Comments
 (0)