]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
KVM: PPC: e500: fix allocation size error on g2h_tlb1_map
authorScott Wood <scottwood@freescale.com>
Wed, 22 Aug 2012 15:04:23 +0000 (15:04 +0000)
committerAlexander Graf <agraf@suse.de>
Tue, 25 Sep 2012 07:42:36 +0000 (09:42 +0200)
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().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/e500_tlb.c

index 43489a8fa98561eb6a8d7ecc1b351a94b6ff731d..a27d134eef3674f98ba1535931582c8106e4291c 100644 (file)
@@ -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)