Browse Source

KVM: MMU: Fix cleaning up the shadow page allocation cache

__free_page() wants a struct page, not a virtual address.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Avi Kivity 18 years ago
parent
commit
c4d198d518
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/kvm/mmu.c

+ 1 - 1
drivers/kvm/mmu.c

@@ -244,7 +244,7 @@ static int mmu_topup_memory_cache_page(struct kvm_mmu_memory_cache *cache,
 static void mmu_free_memory_cache_page(struct kvm_mmu_memory_cache *mc)
 {
 	while (mc->nobjs)
-		__free_page(mc->objects[--mc->nobjs]);
+		free_page((unsigned long)mc->objects[--mc->nobjs]);
 }
 
 static int __mmu_topup_memory_caches(struct kvm_vcpu *vcpu, gfp_t gfp_flags)