Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3027603rwb; Mon, 15 Aug 2022 16:25:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR5nvd8Xlwd1vQWK15+V6h909ZIitKdmtJo5MdDlV8NpYfGxKXqy6f9SdQngi6AS3BNvDBoV X-Received: by 2002:a17:906:a089:b0:72f:826b:e084 with SMTP id q9-20020a170906a08900b0072f826be084mr12321390ejy.708.1660605958830; Mon, 15 Aug 2022 16:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605958; cv=none; d=google.com; s=arc-20160816; b=g682dLUxS3GRDffvwMejO240d9pyY+eX5x3QrCqbPy8y/uhsM8E7N3B6YlN4GTqcL5 XlF7nXhO1p3gpSJafHvVSINHmlNTFf8Ek97bw22vQClP3RXOA7LKLNU2idBVLEIdalaP aRpQmSeG7g3gRGSIxid/9OSNEPcXAT+iYOoDP87fbR/Nq2C4a7fvdTqBNQgMFdw1T1Dw tGKgOrY6kOMC35jEfVnu+PDmBpIUy8dMcVVdv0sj9qQx7NyjQz7ASGE8PYtguLwrNIh+ s+Sbj8zmkX1czm5lsYk1e7f0nnR+Nf97glPB+nFAHycXpcx31MZrd5s0Tr2Vepa53ZpT 2WjA== 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=D0Ym+smzMPsUSqxSPisrIhkU2Uy85/EaHAtOprETXkI=; b=n4jO/yB/sSbhMbYyvNKfbZb7xCHFtTmLt5LVbSBm1VCyXJGvY3LmfxcyhP9NJbmQMf sxaHcVkVyd7hKvb8OF117cKTubqGp5BHVA6aBOFPcF0iHDcJsPAO13sz9i1r9xGZfeJ1 +RIf61q9s6Oq7QxBMU2GkxrswsXhyyrf9uiBSth5kTIpMA3kqkkfPQsoCxgzq6wXByge uY20u6gk3MxEsoynmD077HeAELMyXjZzGspxc2fZS2kKPX29GYyDklCMDqmPWGFNK2E1 Tmm+FzOFolLG3o+4i110zAHBk8koWJ0RFGyAMNL7gJAY9ebvjNhl1rzz9X9sxNuMmvQn aang== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HbBnyhCq; 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 o7-20020a056402438700b0043bd87c7abesi9381382edc.34.2022.08.15.16.25.33; Mon, 15 Aug 2022 16:25:58 -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=HbBnyhCq; 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 S1352285AbiHOW7T (ORCPT + 99 others); Mon, 15 Aug 2022 18:59:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352271AbiHOW5R (ORCPT ); Mon, 15 Aug 2022 18:57:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1121F62AA8; Mon, 15 Aug 2022 12:56:12 -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 7AF14B80EB1; Mon, 15 Aug 2022 19:56:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9C57C433D6; Mon, 15 Aug 2022 19:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593369; bh=FDoJxHlFo7cH3ku55qhsLbAub7KyWpXjqOlGy/VtYmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HbBnyhCqOXid8+c+rm0h8EGRVhRkNNuqqwoqmoARpHOVK9X94idFgx1ICD/wPBU+s d2czrHSD2oyUyMxlqNYexQqT84SmUjBQaQs6XMOXJd7XmphSfcoLJo1Gy1Y1CX4tRa Pqrs2YLMWHGepRRJSFDoAUbIOruGaaVY3Ay6Kgq8= 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.18 0936/1095] powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader Date: Mon, 15 Aug 2022 20:05:35 +0200 Message-Id: <20220815180507.938063912@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 4c702192412f..96f5e2e43018 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