From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20B01C2BA2B for ; Tue, 14 Apr 2020 03:05:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5A042072D for ; Tue, 14 Apr 2020 03:05:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="keUrCFdv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5A042072D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DTCK7Yw3aZy5FUO2bNEemd1yZwhd0Edmw5a/8aMeszw=; b=keUrCFdvMPPWDY joXS6yjGdVbhTWpok4XxpZzNbwZ7SdwCXaK3xwi376JVHTYzjhjJzLsBQtCa/XpZTRBdO2m2hXXaq vAsNLzBV/+7SGpBy/68T5R/7Ai8xVLGjfrElwmLx3B44AFG516qOuVA5v50sfgkmiY23fdALJURtk EziNPZJqKfDKI/qMPdCKTN89m6hJeFRqRur9Yk2UUL103Vg3DZVEqgG0loetauac2iul0CyoCFcLR VOG42OqLeRILI7rvbYHzMhFbNyr33SS4WoBg0DAVuxtjKYd7uvVPT3WdQZp2KSL0V/SyZsVZ45NT7 qBUxvBiZhHaKJyYs+rOA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOBsg-0004ou-8T; Tue, 14 Apr 2020 03:04:58 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOBsB-0004OH-9S for linux-arm-kernel@lists.infradead.org; Tue, 14 Apr 2020 03:04:30 +0000 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3826CD28A6A4E787588D; Tue, 14 Apr 2020 11:04:16 +0800 (CST) Received: from DESKTOP-8RFUVS3.china.huawei.com (10.173.222.27) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Tue, 14 Apr 2020 11:04:08 +0800 From: Zenghui Yu To: Subject: [PATCH 0/2] KVM: arm64: vgic_irq: Fix memory leaks Date: Tue, 14 Apr 2020 11:03:46 +0800 Message-ID: <20200414030349.625-1-yuzenghui@huawei.com> X-Mailer: git-send-email 2.23.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.173.222.27] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200413_200427_903010_1C36B119 X-CRM114-Status: UNSURE ( 5.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: suzuki.poulose@arm.com, maz@kernel.org, linux-kernel@vger.kernel.org, yezengruan@huawei.com, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, Zenghui Yu , wanghaibin.wang@huawei.com, julien.thierry.kdev@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org A memory leak on vgic_irq structure was recently reported by kmemleak on the guest destroy (or shutdown). It turned out that there're still pending interrupts (LPI) staying in the vcpu's ap_list during destroy so that KVM can't free the vgic_irq structure due to an extra refcount. Patch #1 is intended to fix this issue. Patch #2 is a memory leak fix on the error path, noticed while debugging. Zenghui Yu (2): KVM: arm64: vgic-v3: Retire all pending LPIs on vcpu destroy KVM: arm64: vgic-its: Fix memory leak on the error path of vgic_add_lpi() virt/kvm/arm/vgic/vgic-init.c | 6 ++++++ virt/kvm/arm/vgic/vgic-its.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) -- 2.19.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel