Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2876433rwb; Mon, 15 Aug 2022 13:07:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ylAiq0AS1wGYiGFm//+LhWGybc8P81e2tRz3xX/pBBuDWUsMDuR9FXsXPuwXuSjdSIebf X-Received: by 2002:a05:6a00:27a9:b0:531:cec:5d2 with SMTP id bd41-20020a056a0027a900b005310cec05d2mr17704032pfb.42.1660594032669; Mon, 15 Aug 2022 13:07:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594032; cv=none; d=google.com; s=arc-20160816; b=gowojBttfzqxD2Qj1iKcQsp3n/Yt7++NgrfzPP6FdwpllVzTlncuSep++eucFBrBt2 a3BCXUUv1dOxrwBLG6UVcTLo+ehDImSz08vsFHdos6zzbXEI1hKGaPaUIPLZRrPuNNj3 QDxaQwqOu+36mvnikfio6A+oJsrcHdBTEpbDy79F2f2IWOEJQ91cpO5ztcjlfQt/onti yO666wKWPYBGhr3KYBs1J3Y6OHFIS/H7/CjL0YUWXF5fme/DcrWIffYABwOVZ1Xt+OgE ipI1z23xIvHFZG1ZdS0eoNfEqt93ipkKNSh8eXTNYvT3mfgaPUgI4ogD2wUDSt5YPlEz GMpA== 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=646+/Ll8cV5Nf7lrO028F3QFqQi9qfGce1jWaBrdfY8=; b=ysEbHMIbo8rErqmc2DsdWJJ2ieNYMMMmxcljyeWRiwuo6WMqoZgGnKDe+y3Ohowl7L oAkH2uv1DTkQ3yEnDqFKcZNYDPHPSNFTa+uqmS8zwo/Yqs2YreBBA/DsPBa/BuY32vB+ RuPyO2RsSJAOnCu9QFpTeLKLBkwxzZJVYPPJpUeRVcYCX8c0MjITSrJSZ8iPcGV8aiQ1 vbxcODQfZ2wMSKaV+KBqUyuAXD1TGLydPulvRc5grA5m1x+pQRp3WH0Fo2cv7BHR3cKf wtMSoq6HffoZps6+SbY3+KOV/I7eAnsi7JmhnyEafQrrl+gM9TKbd1e40eiWLqTyG5Ks LNZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WXgsUPlQ; 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 t3-20020a170902e84300b0016d910ac9d1si14270478plg.119.2022.08.15.13.07.01; Mon, 15 Aug 2022 13:07:12 -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=WXgsUPlQ; 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 S1344471AbiHOTnO (ORCPT + 99 others); Mon, 15 Aug 2022 15:43:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344223AbiHOTjM (ORCPT ); Mon, 15 Aug 2022 15:39:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5D873FA36; Mon, 15 Aug 2022 11:46:49 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 48775611EA; Mon, 15 Aug 2022 18:46:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B668C433C1; Mon, 15 Aug 2022 18:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589208; bh=oh8spEm7HRDLUB099iOQF8whp8gjdsZtkabb2xOHksk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WXgsUPlQQzoei0LZwzMqhZ+gKK0quMjwKAm8gFeMiz+HszhrBj+NvN9P7TZ/SSRk/ zQkqzboSD/u8LOmb8y087zygeTQw8NIqZLqJ0fBoLLtpDKePxw+FK3Q2prGeOK/pUH neco8c5SxfuFNEUoz+FnqOaYeCGkmfD+cQeu6QkY= 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.15 646/779] powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader Date: Mon, 15 Aug 2022 20:04:50 +0200 Message-Id: <20220815180404.979237902@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 bed05b644c2c..ed37a93bf858 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -659,6 +659,7 @@ spufs_init_isolated_loader(void) return; loader = of_get_property(dn, "loader", &size); + of_node_put(dn); if (!loader) return; -- 2.35.1