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 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 51364C433F5 for ; Mon, 31 Jan 2022 15:53:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id EB74060797; Mon, 31 Jan 2022 15:53:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xwSy_7DrR1zS; Mon, 31 Jan 2022 15:53:32 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id D81F3606A9; Mon, 31 Jan 2022 15:53:31 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id BD374C001A; Mon, 31 Jan 2022 15:53:31 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 06BA9C000B for ; Mon, 31 Jan 2022 15:53:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E74FB813C7 for ; Mon, 31 Jan 2022 15:53:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id spj9IueyFZs1 for ; Mon, 31 Jan 2022 15:53:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2C745812FF for ; Mon, 31 Jan 2022 15:53:29 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id 28E494DC; Mon, 31 Jan 2022 16:53:27 +0100 (CET) Date: Mon, 31 Jan 2022 16:53:25 +0100 From: Joerg Roedel To: Lu Baolu Subject: Re: [PATCH 2/2] iommu/vt-d: Fix potential memory leak in intel_setup_irq_remapping() Message-ID: References: <20220128031002.2219155-1-baolu.lu@linux.intel.com> <20220128031002.2219155-3-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220128031002.2219155-3-baolu.lu@linux.intel.com> Cc: iommu@lists.linux-foundation.org, Guoqing Jiang X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Fri, Jan 28, 2022 at 11:10:02AM +0800, Lu Baolu wrote: > From: Guoqing Jiang > > After commit e3beca48a45b ("irqdomain/treewide: Keep firmware node > unconditionally allocated"). For tear down scenario, fn is only freed > after fail to allocate ir_domain, though it also should be freed in case > dmar_enable_qi returns error. > > Besides free fn, irq_domain and ir_msi_domain need to be removed as well > if intel_setup_irq_remapping fails to enable queued invalidation. > > Improve the rewinding path by add out_free_ir_domain and out_free_fwnode > lables per Baolu's suggestion. > > Fixes: e3beca48a45b ("irqdomain/treewide: Keep firmware node unconditionally allocated") > Suggested-by: Lu Baolu > Signed-off-by: Guoqing Jiang > Link: https://lore.kernel.org/r/20220119063640.16864-1-guoqing.jiang@linux.dev > Signed-off-by: Lu Baolu > --- > drivers/iommu/intel/irq_remapping.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) Applied this one, thanks. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu