From patchwork Thu Aug 23 01:04:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 1363931 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1D1853FD40 for ; Thu, 23 Aug 2012 01:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751951Ab2HWBEe (ORCPT ); Wed, 22 Aug 2012 21:04:34 -0400 Received: from am1ehsobe002.messaging.microsoft.com ([213.199.154.205]:21062 "EHLO am1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751532Ab2HWBEb (ORCPT ); Wed, 22 Aug 2012 21:04:31 -0400 Received: from mail13-am1-R.bigfish.com (10.3.201.253) by AM1EHSOBE010.bigfish.com (10.3.204.30) with Microsoft SMTP Server id 14.1.225.23; Thu, 23 Aug 2012 01:04:29 +0000 Received: from mail13-am1 (localhost [127.0.0.1]) by mail13-am1-R.bigfish.com (Postfix) with ESMTP id AEE84160091; Thu, 23 Aug 2012 01:04:29 +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(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bhf0ah107ah1155h) Received: from mail13-am1 (localhost.localdomain [127.0.0.1]) by mail13-am1 (MessageSwitch) id 1345683868128437_26444; Thu, 23 Aug 2012 01:04:28 +0000 (UTC) Received: from AM1EHSMHS016.bigfish.com (unknown [10.3.201.249]) by mail13-am1.bigfish.com (Postfix) with ESMTP id 13566A0044; Thu, 23 Aug 2012 01:04:28 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS016.bigfish.com (10.3.207.154) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 23 Aug 2012 01:04:27 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.309.3; Wed, 22 Aug 2012 20:04:26 -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 q7N14Ohs004896; Wed, 22 Aug 2012 18:04:25 -0700 From: Scott Wood To: Alexander Graf CC: , Subject: [PATCH 2/2] KVM: PPC: e500: MMU API: fix leak of shared_tlb_pages Date: Wed, 22 Aug 2012 20:04:24 -0500 Message-ID: <1345683864-10815-2-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1345683864-10815-1-git-send-email-scottwood@freescale.com> References: <1345683864-10815-1-git-send-email-scottwood@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This was found by kmemleak. Signed-off-by: Scott Wood --- arch/powerpc/kvm/e500_tlb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index a27d134..641f978 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c @@ -1134,6 +1134,8 @@ static void free_gtlb(struct kvmppc_vcpu_e500 *vcpu_e500) } vcpu_e500->num_shared_tlb_pages = 0; + + kfree(vcpu_e500->shared_tlb_pages); vcpu_e500->shared_tlb_pages = NULL; } else { kfree(vcpu_e500->gtlb_arch);