Skip to contentSkip to conversation

KVM: PPC: e500: fix allocation size error on g2h_tlb1_map

PATCH New Alexander Graf 1 participant 1 message Oct 4, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 50/56 KVM: PPC: e500: fix allocation size error on g2h_tlb1_map

From: Scott Wood <[email protected]>

We were only allocating half the bytes we need, which was made more obvious by a recent fix to the memset in clear_tlb1_bitmap().

---
 arch/powerpc/kvm/e500_tlb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kvm/e500_tlb.c +1 -1
index 43489a8..a27d134 100644
@@ -1385,7 +1385,7 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500)
 	if (!vcpu_e500->gtlb_priv[1])
 		goto err;
 
-	vcpu_e500->g2h_tlb1_map = kzalloc(sizeof(unsigned int) *
+	vcpu_e500->g2h_tlb1_map = kzalloc(sizeof(u64) *
 					  vcpu_e500->gtlb_params[1].entries,
 					  GFP_KERNEL);
 	if (!vcpu_e500->g2h_tlb1_map)
Signature · 1 line
1.6.0.2