Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3414178rwa; Tue, 23 Aug 2022 04:30:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR77R/4noaKdtgiDWExaqqhLfPQJ95BfnpMlt1tCsVx6iJ4QRiNm/vwvQYmLjEuhCUxLDK8q X-Received: by 2002:a17:907:6d24:b0:731:7720:bb9b with SMTP id sa36-20020a1709076d2400b007317720bb9bmr16179707ejc.717.1661254119464; Tue, 23 Aug 2022 04:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661254119; cv=none; d=google.com; s=arc-20160816; b=EIkt/BcBtxdjcgyRbX6rxs6YAUN7ipFPLM5p8zle+ZVxF/Q+RvqIEeKLbvMxtCkxDR pqFL4jQed57myGLnFxTJoYfBmS/CO1sxSYaOIIGTI5lPTTg4pZtV+ooZY2nJum3pTyA/ CL8pVGSSp1LUDH6ByKNPoCKJrQ1jZoRCGOOCbclkusnrAnj97ff08kn08shC6erSwjx7 koYJ9tyJ6ZC7oRZdmSDrtTsklW9AlEu3mAqHTTb2oy+OyFbivgIXYUSFgxBBqYm7U2tx T/2LF1b8jTeTEDr88VctrMgrrzy8zCGCgN+LT9xFI7/7ULuGAzg4nG/7/0EN0Abt1bue 8Omw== 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=66W2jDQVa3k1SfgoeJyALDHzSGrj51LGotfbsmkaFLs=; b=yO1oiazApiSr3r9/92XuXT8bbTJZv7RwX0FDFFeHI3/u1J5TXE77EXbhOs6J3Kg5cp SyFZ/8Z9viZ82xSP8mltxfnFXJz4bl2udLVMEDD/TyAjKqEL+3e6mLsMZVGy7YkjhCTD fm6Lge2FX7KrE3AhuKbVkrS2dvj9GhUv0sJsSiTY9C9my7V1bHBtUfDD2iRRBZdpo44n HWWCZbmZ2jOgvntqfn4y8RdR6ck1V+rV8yqPxoycipwBpoTzWYlSlYc82OPJ0W77eI/y EUblAeKJvIzcDb5uehLYa0Xp848fhLtlXuSH1WyWgOAFaBaC98aBvB3Fs3VRwJW4NAeG sgVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=embiuZEV; 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 wg6-20020a17090705c600b0072b4adf5c0fsi11865549ejb.77.2022.08.23.04.28.13; Tue, 23 Aug 2022 04:28:39 -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=embiuZEV; 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 S1355957AbiHWKsf (ORCPT + 99 others); Tue, 23 Aug 2022 06:48:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356340AbiHWKmA (ORCPT ); Tue, 23 Aug 2022 06:42:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46CB8A927D; Tue, 23 Aug 2022 02:09:28 -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 117B96153D; Tue, 23 Aug 2022 09:09:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E48FC433D6; Tue, 23 Aug 2022 09:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245753; bh=grUTRLlYxf0QguzYoFcDN2EGtAKUrN0epPX1iavpqto=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=embiuZEV0rNEI+t5Ua6o0BfTedwb3f61j6Gv71i6U3eU3ABO1L7w+hiR6t/xAg4+q supAhXuY/EBHuNJ6f9V9/Ae9pEpF5JpgBq6Vl9XjdcqaoYkModdBdIR6Q7uaCfbBw+ IsYLY9KekN4EKur7QUqDcmA4JP2ktiJx/4BXXWmc= 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 4.19 171/287] powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader Date: Tue, 23 Aug 2022 10:25:40 +0200 Message-Id: <20220823080106.526245435@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@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 db329d4bf1c3..8b664d9cfcd4 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -684,6 +684,7 @@ spufs_init_isolated_loader(void) return; loader = of_get_property(dn, "loader", &size); + of_node_put(dn); if (!loader) return; -- 2.35.1