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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4631AC433F5 for ; Sun, 8 May 2022 09:38:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IUI2/x8MmthzcVe9HLl8Ssbd2KSQcx4+rI2e0Puj+LA=; b=efh5iAz+QQ8o9w pOseL4cQzKSFVhicTHEKXHDxlAbLxgpgf83u+VT3QgJJG8g1ovSDMwVRkD6PB7rpxaEIZU9YSlA5R sTIb3hWOhmYVGS+QmClewxYO22ZebONV1N3HnICHBbD+9Vkrj33UZZzrBxtctUKIzE4ex0Kz1Hzrr 8EZd7GG7OSAydqHEUXmmXHv4PQ/U/c6DWNdQ69jQtUgSUc32jKzcw3rnKhByM8UhQ0pKHPRrKncKb xvEPpjntPMYry0WHpUS5bI8OfZHUSwkiiPS1Jo/953Z5loTOybWljwB3WELluz7X9IK8H0/iXxgz9 rUGfjv8PQk+wxE5Ajriw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nndMT-009fVn-BT; Sun, 08 May 2022 09:37:57 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nndMM-009fSr-I9 for linux-arm-kernel@lists.infradead.org; Sun, 08 May 2022 09:37:52 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 61EFA6101B; Sun, 8 May 2022 09:37:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9729C385B1; Sun, 8 May 2022 09:37:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652002667; bh=CO8eszrNyeg7Y/qMNeBnxIysS//DAaQZ0CyTFGBlXCY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dU1S/CHqRqxnPQpN70b7EyA6DBilSbhzsB6/gmYr1VgC0yNCCbqm3NrzN/tp+ZumF UVqJRooJjJ547vYSXBBn+bG7JHs6yEjIk6fmSzZHzHg7Ogx1kIiuenz4gfd10ls9WT pttCP2JhDJy5FPypXT47ZJPyfBorEQGG2+RgM2qq22ipMxnKNdPOwnJAUIi2ICyMYD 5AsHAiypTgynzKU0l4gsojti/A3W2S5jWSpMc3fTNz5XDlPEE26Jb1AgWZQRbeSu9r HkNfUM2OUCiBBEIPW4aEKYhYDD+IIumh+8jFLhQ9Sq1Q9QRd0baPUcj3uT9bphYbNh HWTrmKZdmsGHQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nndMH-009lGR-5V; Sun, 08 May 2022 10:37:45 +0100 Date: Sun, 08 May 2022 10:37:45 +0100 Message-ID: <87k0aw74ba.wl-maz@kernel.org> From: Marc Zyngier To: Yang Yingliang Cc: , , Subject: Re: [PATCH] irqchip/gic-v3: fix missing of_node_put() in gic_populate_ppi_part() In-Reply-To: <20220507033506.248310-1-yangyingliang@huawei.com> References: <20220507033506.248310-1-yangyingliang@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: yangyingliang@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tglx@linutronix.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220508_023750_675373_3762EF16 X-CRM114-Status: GOOD ( 22.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 07 May 2022 04:35:06 +0100, Yang Yingliang wrote: > > If kcalloc() fails, refcount of 'parts_node' should be decreased. > > Fixes: 52085d3f2028 ("irqchip/gic-v3: Dynamically allocate PPI partition descriptors") > Reported-by: Hulk Robot > Signed-off-by: Yang Yingliang > --- > drivers/irqchip/irq-gic-v3.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > index b252d5534547..27a35aec2e48 100644 > --- a/drivers/irqchip/irq-gic-v3.c > +++ b/drivers/irqchip/irq-gic-v3.c > @@ -1865,7 +1865,7 @@ static void __init gic_populate_ppi_partitions(struct device_node *gic_node) > > gic_data.ppi_descs = kcalloc(gic_data.ppi_nr, sizeof(*gic_data.ppi_descs), GFP_KERNEL); > if (!gic_data.ppi_descs) > - return; > + goto out_put_node; > > nr_parts = of_get_child_count(parts_node); > If you are concerned about this, then why not also address the memory leak that occur on the same path? Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel