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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 B725FC433EF for ; Wed, 1 Jun 2022 14:14:09 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LCrjr3QLFz3fZK for ; Thu, 2 Jun 2022 00:14:08 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=JNCOtMUB; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:4641:c500::1; helo=dfw.source.kernel.org; envelope-from=sashal@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=JNCOtMUB; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4LCrPt0gTDz3fKd for ; Thu, 2 Jun 2022 00:00:18 +1000 (AEST) 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 657FE6164C; Wed, 1 Jun 2022 14:00:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9C14C385A5; Wed, 1 Jun 2022 14:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654092015; bh=SpEc8xwd/DWXEBIER3O/kILG2B+8H0RsWfZGILzBquk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JNCOtMUBNfHRR16Mw+2aTgbriJFfDLe6bTCatnXOeHaXpWfDSGhUHMrE00tQY9Fnq wfGGbliQHptvmPV3vo1KJSInR6hsMaAXBVN39RP/F67jIolJwQfKw5j+URRLJi/6ub n+xEYPrIRSt4xCFnVZ1YhxgxTar9M5S5KcjRcAjda+9MzP962Wz/KqSjQU5cvfgadC /wke+d0fVncQEkY4eZWx0jG5mfzWtQZ/gfQonN/S5tJryLlwn+IoQKXU6frr9voO71 PqN2Jlnt8o+arK9JsPUiM5w0AZ6jiuxlk3cKRjK1GRNtjpyKiu5f+ZNdGvzqUhPW9r VMzKcskrABfLA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 12/15] powerpc/xics: fix refcount leak in icp_opal_init() Date: Wed, 1 Jun 2022 09:59:47 -0400 Message-Id: <20220601135951.2005085-12-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220601135951.2005085-1-sashal@kernel.org> References: <20220601135951.2005085-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , nick.child@ibm.com, Lv Ruyi , maz@kernel.org, linuxppc-dev@lists.ozlabs.org, Zeal Robot Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Lv Ruyi [ Upstream commit 5dd9e27ea4a39f7edd4bf81e9e70208e7ac0b7c9 ] The of_find_compatible_node() function returns a node pointer with refcount incremented, use of_node_put() on it when done. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220402013419.2410298-1-lv.ruyi@zte.com.cn Signed-off-by: Sasha Levin --- arch/powerpc/sysdev/xics/icp-opal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/sysdev/xics/icp-opal.c b/arch/powerpc/sysdev/xics/icp-opal.c index e3e52cf035a9..672d8aedae12 100644 --- a/arch/powerpc/sysdev/xics/icp-opal.c +++ b/arch/powerpc/sysdev/xics/icp-opal.c @@ -199,6 +199,7 @@ int icp_opal_init(void) printk("XICS: Using OPAL ICP fallbacks\n"); + of_node_put(np); return 0; } -- 2.35.1