Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp654479iog; Thu, 30 Jun 2022 07:46:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sTHp8lLZnCW0BK3dTWq0xpQBCfZoEXMS4+99UDO4uCn6CsMGDmQQ7omyWttQFn9cOjMOl8 X-Received: by 2002:a63:2a95:0:b0:40d:62ed:9625 with SMTP id q143-20020a632a95000000b0040d62ed9625mr7994127pgq.282.1656600369625; Thu, 30 Jun 2022 07:46:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656600369; cv=none; d=google.com; s=arc-20160816; b=ZAJ+n/QYcTKX30smeVsyOUe2bhv8seYYIxO+veEAQU8T95qfA6B/rwf7z+dNry5jOn FnOapXHQmFfVkEGCi5ttdWxCfiQYVvYExZdNw6G3e5n3sokmDCfaBWXfq6aJYpMiZPmG bXIta6B7Jk/o/2jrQCwQ0ZQEMR/lfuAJ4wFo2qK4XA2hjWi7wjT60nJGECcLpFBA8xIh 9He7yZ4b3T9S6APKktfODRE/7Oasr7ifFaYMdcnfY5CX8NX+9jlmMAT9699CZLHmg78q OgCD3jxobfxoMXhB+HUWx8Q7fw27p+DSd9My6zo2Z2OmVkxkVn4/b9wBVaW5p+zGqBZo cSdg== 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=/HwKY13CEqd7LeJrXwU23UyuCvxKcalHDciVraLW6a8=; b=zldzgv4GwGATJFB11PZJOVXZCDYZBAqdq8wkki+EZ5h32Z+5LewKtZ0gWx/GVjAKL/ 17XE8NANSzl7yhA+6gKVzDTnW0zAuY2cfJEWjzi438g/OnRVcoEC9qLDvT1pXlZ+T7Mt M7/7DYSwmCGUAJ88EyQlPRkZlEc9SAsh+jtMnBfhC/BJiFG4O0bkvjj1i6bTa8N01ik0 O3uzmSbQqDF+TEsGFTfrTQblowS23VYpzEg7Q8XL3weftPhm8/TItRL/klX/iuqZ847S Elq551WmvhmiRNibKrIzJp0BXRoOwgd+Dyt5itsMeiidVLLTq/qVB8DsBdro7jgdomSl AmYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VktXvBq1; 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 p15-20020a635b0f000000b00407e25d4528si28237661pgb.5.2022.06.30.07.45.57; Thu, 30 Jun 2022 07:46:09 -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=VktXvBq1; 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 S235972AbiF3N7v (ORCPT + 99 others); Thu, 30 Jun 2022 09:59:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236522AbiF3N7D (ORCPT ); Thu, 30 Jun 2022 09:59:03 -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 BC280419BA; Thu, 30 Jun 2022 06:51:53 -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 097F461FC0; Thu, 30 Jun 2022 13:51:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18893C34115; Thu, 30 Jun 2022 13:51:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656597108; bh=//tNa/+oXvrh+YZZ1UklDkaYoawaeD35eJmeJbf1BKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VktXvBq1SJMpwceGU1arx9CJ33p6TuKmv0mcqbCLMZC84C8MBJvANeSpjIValg27E EWlDg4Je4o6CZlTcOgjI8jxXBB4M7aCilLGujZwaloAbLNZ3BKc21cg+r7XttHzVXI Bv+Kc2uerb+oKXMnaBC7omV6u+JvfW3ofaVokJro= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liang He , Max Filippov Subject: [PATCH 4.19 30/49] xtensa: xtfpga: Fix refcount leak bug in setup Date: Thu, 30 Jun 2022 15:46:43 +0200 Message-Id: <20220630133234.780953142@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220630133233.910803744@linuxfoundation.org> References: <20220630133233.910803744@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 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: Liang He commit 173940b3ae40114d4179c251a98ee039dc9cd5b3 upstream. In machine_setup(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Cc: stable@vger.kernel.org Signed-off-by: Liang He Message-Id: <20220617115323.4046905-1-windhl@126.com> Signed-off-by: Max Filippov Signed-off-by: Greg Kroah-Hartman --- arch/xtensa/platforms/xtfpga/setup.c | 1 + 1 file changed, 1 insertion(+) --- a/arch/xtensa/platforms/xtfpga/setup.c +++ b/arch/xtensa/platforms/xtfpga/setup.c @@ -152,6 +152,7 @@ static int __init machine_setup(void) if ((eth = of_find_compatible_node(eth, NULL, "opencores,ethoc"))) update_local_mac(eth); + of_node_put(eth); return 0; } arch_initcall(machine_setup);