From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39A54848D for ; Fri, 10 Mar 2023 14:29:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3683C433EF; Fri, 10 Mar 2023 14:29:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678458566; bh=PtBprJ9XsFi/ywJ6L7Ncb08ObdmaseqEDbAtl1kEXP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2N6cGqeKX3Q1bfCO60HvdCMTDXz55uG0aYkoZJGoh+K3LhhtWAOimnU8AUBTHumiV BPUPx5eGAc4DkwoSC8KpOjQIygL6pgnxbJ1DylaghJYqawxZ+lHg3YKPErGsNFkgk/ MkvwLzaPNDOkU5jXTQkP1RBPJlQ8U+UHLYdsdCcE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Miaoqian Lin , Marc Zyngier , Sasha Levin Subject: [PATCH 5.4 069/357] irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains Date: Fri, 10 Mar 2023 14:35:58 +0100 Message-Id: <20230310133737.016032209@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310133733.973883071@linuxfoundation.org> References: <20230310133733.973883071@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Miaoqian Lin [ Upstream commit 071d068b89e95d1b078aa6bbcb9d0961b77d6aa1 ] of_irq_find_parent() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: e6b78f2c3e14 ("irqchip: Add the Alpine MSIX interrupt controller") Signed-off-by: Miaoqian Lin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230102082811.3947760-1-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/irqchip/irq-alpine-msi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c index ede02dc2bcd0b..1819bb1d27230 100644 --- a/drivers/irqchip/irq-alpine-msi.c +++ b/drivers/irqchip/irq-alpine-msi.c @@ -199,6 +199,7 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv, } gic_domain = irq_find_host(gic_node); + of_node_put(gic_node); if (!gic_domain) { pr_err("Failed to find the GIC domain\n"); return -ENXIO; -- 2.39.2