Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1863884rwb; Fri, 19 Aug 2022 10:38:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR5361YtKgqxeCleaacryYSLYdFxeVH57sM82uTVbVVIpu9Epiwo/gk07pqPCEKWbCK3Qg/7 X-Received: by 2002:a17:90a:e7cc:b0:1f7:26c9:ee9f with SMTP id kb12-20020a17090ae7cc00b001f726c9ee9fmr9612357pjb.75.1660930731146; Fri, 19 Aug 2022 10:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930731; cv=none; d=google.com; s=arc-20160816; b=TsCE5ucmAvDExeGcoSvqtwUD6go0JKw5hpKgTB1Qa0ijXALTvR/HVrxeoNoF9Mq83v OAMoCLAHBQycTS2vuR/gFK5s5xqhWSAjUqPyGO8+0xZdKpxRv47bFi3wwnkxa3vgSYCV lPcrHb5nrdyBVWpDIcy/Xw1KNBajOH4rjV7/qdxdRpHw724swOhXgmHIMGmWeZGTf8gm Fq/gzHhi2pMoHyN5Y8wWecASGfeF4hz7Nu2NVQ5Jz8orVV54+GYE/uNrawTej/ymJ0Ql Bkus0+foKHKUWZJPBmWj5k3j6BxAZtPp2xV8pBDGSPCD0CXtgbKp8KorpCYcBfhYKSNH aSIg== 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=gx/yUQv6Kb7yB96IspLmQR2teQSTAtVncgVozXTmybw=; b=emWCMC4mMvz6rIIooZzcPhSMfp3Q9cUXeXvP9jWO64hE662xeFT4ndabKzoZY4B2tZ u5BQhNxFxj/gUVPwbtjmlNAc9Vbh39Dbx5KMVth0Gp61WfUhJ5YuvzRkhlqaoC8brO8p +ucAXGbVdyQODOIJKikyFXUbOKYTQcgxXVt319re2HZxf+1KBCjI2YcOZHnNzkneFU+h T2UeYWgKufBhfrxZke/9VYdH7cHTGya1MQx4RczdAZfuvOsOpkKIUHq8z6SOgE6YBfHx 6LN9BxNyif0z6vLuEx36N2Js8G+Ll6bifEHn2Or5+IuU8IF4fKAXrX9/XFAA68yMkylF s8ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vf1jYEpB; 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 r7-20020a63d907000000b003fd31d844f7si4695544pgg.538.2022.08.19.10.38.40; Fri, 19 Aug 2022 10:38:51 -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=vf1jYEpB; 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 S1353480AbiHSQhz (ORCPT + 99 others); Fri, 19 Aug 2022 12:37:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352895AbiHSQck (ORCPT ); Fri, 19 Aug 2022 12:32:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D5EB10D5B7; Fri, 19 Aug 2022 09:06:58 -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 A37EDB82804; Fri, 19 Aug 2022 16:06:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE0B2C433D6; Fri, 19 Aug 2022 16:06:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660925215; bh=6dF5TB/aJ1+miP79MTYgnNJanT5YTS6HF7U0DLVihcY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vf1jYEpB7FANnHJ+7nWv0V85A8UldJh6HSdiPk/IerAKNU8K925xQCbSAPDORVVEF lkRK+LEXpO3g3KOBZfmvNfR41RiBrnB4Tg39tSdCEMVDH5cz2f8aVjT+RZBVuoqylq DtNxIEZK+HbGT0Tv4Aufnn/Ugz4LExvpQk2xhbBc= 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.10 421/545] powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader Date: Fri, 19 Aug 2022 17:43:11 +0200 Message-Id: <20220819153848.272071255@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 25390569e24c..908e9b8e79fe 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -664,6 +664,7 @@ spufs_init_isolated_loader(void) return; loader = of_get_property(dn, "loader", &size); + of_node_put(dn); if (!loader) return; -- 2.35.1