Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3407233rwa; Tue, 23 Aug 2022 04:22:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR4TuF881S3GgllcToM+ANvoxZ0tgCymxBdByBT2stbgYFLh8YpO3+1rHODfCTQ/9y2Vw/7I X-Received: by 2002:a63:91c3:0:b0:41d:271:4930 with SMTP id l186-20020a6391c3000000b0041d02714930mr19449620pge.341.1661253779356; Tue, 23 Aug 2022 04:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253779; cv=none; d=google.com; s=arc-20160816; b=uc/TQLpDSqDp9pVLp73nC0NJhOWJbPa3tkEkOMAm4WyykWHb4q5a0h41TipYIc00CW G2oawHxFut7srqTm5B4zH3qts3jxesTx5HddMPqENm5kcL0Pko3cvLUwRlnO4+ugwdPQ owKtgoLOwn2mP5lw2dKgpBbDJ8B8Wen/lclysWUpI9vUSssaZ7ArRMBIZxS7FgHrYEnG 0SGvf40i3lnA+rq5zH2LE0ZhI3wpjpn5+q7qAZus1TEg7B+t/Gxwbm6RulsjmA+sTfMz 3lsIrUr+Aq2/lE3/qQ06eQTn7T/35HqFpiH1QPhzLq4kRmkpoGiJrmKxSL/VZzSLJXMA b38A== 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=Lhob9baxV4APl4tQINziRSoqCtWWphuK0+tELplUlPE=; b=peWF2cKjDAUiVx3UQhxu47Oyv2wts3PDJHfXuH6BcEQ1V181zpa61x0h3SamBQGqHx 9CYdytRdLDFANa+IULTOf2rnI2ugANcmBv/epe3A7X/hS6/FZ0ccuBxBI4ChoT9Hsa7W PBDpGaZrWdf7sc5LDK/9acsWM0/HL/gpbrTbk+JKwWpe/fKcXC1hGMFW3EVUEPRI4e1B IGeE083ucfXwDVhBClLcj89GUhqPLMVAis2LhZmN8yuG1r+ntjseHrzr8u+yIKIR+A0D zmClQX8sdN68nJLMJozCYKAiQOcqG4+Z70LPdA/oPsLPlPkNEPUUM81ZsxHEHUTTxUPN ZyVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xEjzXuya; 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 s10-20020a056a00194a00b005371bb2846esi191041pfk.341.2022.08.23.04.22.48; Tue, 23 Aug 2022 04:22:59 -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=xEjzXuya; 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 S1351809AbiHWKAk (ORCPT + 99 others); Tue, 23 Aug 2022 06:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352190AbiHWJ4a (ORCPT ); Tue, 23 Aug 2022 05:56:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3676A0332; Tue, 23 Aug 2022 01:47:19 -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 F3CC5B81C35; Tue, 23 Aug 2022 08:47:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B8F9C4347C; Tue, 23 Aug 2022 08:47:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244436; bh=teXgXwagCJhheI7Y+/QuiPceXborMnBt0F32WtrSM8E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xEjzXuya6OYYWVwFFGgsSQXB88X9n6rkg4dnu4/dmk0onySCZLcJfHKSif/yxv2Gm bHrN+rdc7ZzUjojOZbg05rNGl1xYeb4eEWAltQlifeZU1nA6MTGzVVdfcErw8MJoSY ef7to1si416t6DZTGdr7EWeqSY+DvWl+dWxPPH7I= 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.14 137/229] powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader Date: Tue, 23 Aug 2022 10:24:58 +0200 Message-Id: <20220823080058.586853140@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@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 9558d725a99b..37ba89f2fd80 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