Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3095466rwb; Mon, 15 Aug 2022 18:01:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR6vxlEJW7hYJK/0iOYoLdCOgZuKgDFYrTEWrISslY9H3CRN3W5xKWlOB+s1sTmds7AMEPWJ X-Received: by 2002:a17:907:3e01:b0:730:a690:a211 with SMTP id hp1-20020a1709073e0100b00730a690a211mr11954563ejc.596.1660611663302; Mon, 15 Aug 2022 18:01:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611663; cv=none; d=google.com; s=arc-20160816; b=IsC8HqsE6gsa9y1eeMyqp/oJVZLeKHUt8YEZDUKxR20/ImrxuOJ2QRaUVHwNm3i0kZ +6MnTqjRUHRzZWOVgdc2To9ZoIgrfo4uxa134FQ2wL1s2SO05poBcdGitOhuRf9Qezwx NJQQMWybY7RnGgAFsu8IhqJjWYJKXhc/3R6Tz9UMrGf0lxTKOSv1T7QCpMOAQYHEyeCL XMOPxrbMxpvgsljBfnbYhnteq0xQy2qYKBb2HzTMVsES5awT/D6n9u7wO6o20HUEDpVG jO4o/N0G3KxxX8bd8AmCOoLPDUeDsVd0/PMq7fKypmA2q0ruZa5Zlx4A9xpcNndWyW+t nx7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dTDb8osyFLlViOt5i6cBUbbD9qcNtj9jBvatbp20gt4=; b=h+tusG4manPVj3qdGZ99qmfBKhVbjCy/2kQqjyo8SnxNJQA3R5UdAFrD+keKx3DjWm dvVdE4cx0TB/q7B5hZDDKBHs38ZqWvdkTA1zfu/+2QQ0P2Ieu8E7mIHOy96AYk0zhU2q hvxzxnURuCNkub0Yw1yGa0Hj9TQTBUalBrxUH6EZIwyF+P9r1R0fzJNbSyIGPVWNQ3IF kimCBEIZxsm1/mmfXGQIYNYqTlZYxWtSfN1Ff6eFxC8bjO+IXPhZ5fEiD6nRgagL+CY4 TOu/0GSOfke/SX8Gz8ifQYWFVOmmk09Nk6yLOCjqw/b/8BpM5v8V0cnmf7ydXfYWTh2+ Tnww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GTUKixmb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji14-20020a170907980e00b00730ed3ef293si9641318ejc.12.2022.08.15.18.00.32; Mon, 15 Aug 2022 18:01:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GTUKixmb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241406AbiHPAwd (ORCPT + 99 others); Mon, 15 Aug 2022 20:52:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349822AbiHPAqq (ORCPT ); Mon, 15 Aug 2022 20:46:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76228196845; Mon, 15 Aug 2022 13:45:08 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 6BD17B80EAD; Mon, 15 Aug 2022 20:45:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD03AC433D7; Mon, 15 Aug 2022 20:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596306; bh=W5pDJItj94NXUxrK1mfpqh+HdM5JMas3eDHf6EDrFqs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GTUKixmbUqR62i8yyNmGEggcRACQwfZWuqL8whzk5bm1/iRSH87XWoXWOjGMhdPKt hv99KRUBKQH1ocbu0fMNreTKkL0uZ5ZPafeghAq3Vwd8oqoN+g1/0qQFV/e2N7YkuV ZFgU6erFemDSZKdMiPSZgkBajk8Wen7nrcPV+1Ig= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Arnd Bergmann , Michael Ellerman , Sasha Levin Subject: [PATCH 5.19 1010/1157] powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader Date: Mon, 15 Aug 2022 20:06:06 +0200 Message-Id: <20220815180520.254683760@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miaoqian Lin [ Upstream commit 6ac059dacffa8ab2f7798f20e4bd3333890c541c ] of_find_node_by_path() returns remote device nodepointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 0afacde3df4c ("[POWERPC] spufs: allow isolated mode apps by starting the SPE loader") Signed-off-by: Miaoqian Lin Acked-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220603121543.22884-1-linmq006@gmail.com Signed-off-by: Sasha Levin --- arch/powerpc/platforms/cell/spufs/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 34334c32b7f5..320008528edd 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -660,6 +660,7 @@ spufs_init_isolated_loader(void) return; loader = of_get_property(dn, "loader", &size); + of_node_put(dn); if (!loader) return; -- 2.35.1