From patchwork Thu Aug 23 01:04:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 179478 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BF5EA2C0091 for ; Thu, 23 Aug 2012 11:04:31 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751452Ab2HWBEa (ORCPT ); Wed, 22 Aug 2012 21:04:30 -0400 Received: from va3ehsobe004.messaging.microsoft.com ([216.32.180.14]:25686 "EHLO va3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750893Ab2HWBE3 (ORCPT ); Wed, 22 Aug 2012 21:04:29 -0400 Received: from mail82-va3-R.bigfish.com (10.7.14.250) by VA3EHSOBE008.bigfish.com (10.7.40.28) with Microsoft SMTP Server id 14.1.225.23; Thu, 23 Aug 2012 01:04:28 +0000 Received: from mail82-va3 (localhost [127.0.0.1]) by mail82-va3-R.bigfish.com (Postfix) with ESMTP id 8FF2F42025F; Thu, 23 Aug 2012 01:04:28 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bhf0ah107ah) Received: from mail82-va3 (localhost.localdomain [127.0.0.1]) by mail82-va3 (MessageSwitch) id 1345683866991337_7677; Thu, 23 Aug 2012 01:04:26 +0000 (UTC) Received: from VA3EHSMHS039.bigfish.com (unknown [10.7.14.235]) by mail82-va3.bigfish.com (Postfix) with ESMTP id E4ACA4E005A; Thu, 23 Aug 2012 01:04:26 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS039.bigfish.com (10.7.99.49) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 23 Aug 2012 01:04:26 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.309.3; Wed, 22 Aug 2012 20:04:25 -0500 Received: from snotra.am.freescale.net ([10.214.84.21]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q7N14Ohr004896; Wed, 22 Aug 2012 18:04:24 -0700 From: Scott Wood To: Alexander Graf CC: , Subject: [PATCH 1/2] KVM: PPC: e500: fix allocation size error on g2h_tlb1_map Date: Wed, 22 Aug 2012 20:04:23 -0500 Message-ID: <1345683864-10815-1-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org 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 --- arch/powerpc/kvm/e500_tlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index 43489a8..a27d134 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c @@ -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)