Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp668751iog; Thu, 30 Jun 2022 08:02:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uZ4uq7e1GoU9O/dqUpjtLDs+udSZ/shmhGV7XpRb5fqbsS0iFhLijCKzYEvbL2g+lGgCAI X-Received: by 2002:a05:6a00:885:b0:510:950f:f787 with SMTP id q5-20020a056a00088500b00510950ff787mr14689596pfj.83.1656601367115; Thu, 30 Jun 2022 08:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656601367; cv=none; d=google.com; s=arc-20160816; b=paCSluMjGa8ojmDTD4oJXk8N0DYSnmzIPfFX/Rxz0h84JwZo8hLc7gkOpo4KjxeOav wE3CqCn1j8yDoE6F9N0oPYqs+aw4QIgO0u3ZliKBnUClSr5Vofg22v71/dve487xdkih tzCjzZMyFLBSU+xEV5dQuC12oEcAc4tQfRIvybJcctpHArvGjogxjfWolyt9x1X1S2FS tUgqZS7wRbfKUn9/w6b/EUcQPubWdezCOmEHvTUyN5oA7hMqMWzY/4RVfx5f1MYFX5R/ nEfWLDf8Sr2MQOsACPNxew2aELZIHZur951FWezQy48Rgo9eIyOJmMLZ/xILcqT50lMR mGwg== 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=uVrtW25FG/dlG/Vb6/upWkLUfvQIHfWC/9djC3S4ZTNMAiIgxX5DN+LVjlIg/OBTOQ kIWdIEz68tTg5hoJStYElvrijtR700ehCqxdYd/AinJa84sLLpjUbT08h7Dm5bGqnfEB 0cAVk7HxyfC4HiBszDCSlb1rBzPBNlkDQ5CHM44ZuWW+fQhfUTGz/PeIzGhS66wYNA9P Aylr/48QEZtVdCaB8rhf8Trm0bpmsWfbDo9PMQpaENfTXPIVYHOUOm+6Q3KWj9zd/4RF ctUhQsYPXxrcm7H5Q5gnwthRsQSxznazZbDc4h/ihT/+rINYGZTaaPdg1GOXrivLrBnQ hLAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="H/71ka4w"; 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 o17-20020a170903301100b0016bb9574bfesi132351pla.256.2022.06.30.08.02.18; Thu, 30 Jun 2022 08:02:47 -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="H/71ka4w"; 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 S235789AbiF3Nxg (ORCPT + 99 others); Thu, 30 Jun 2022 09:53:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235829AbiF3Nwi (ORCPT ); Thu, 30 Jun 2022 09:52:38 -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 7428F4578C; Thu, 30 Jun 2022 06:49:44 -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 995D661FFB; Thu, 30 Jun 2022 13:49:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A291FC34115; Thu, 30 Jun 2022 13:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656596981; bh=//tNa/+oXvrh+YZZ1UklDkaYoawaeD35eJmeJbf1BKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H/71ka4wiBvpG98YZevpw19O5C0wO2i3HsqAw7TJDvxVNxUohiIraq/v3DwTEVb1Q Sltt5kBe3EJY3MERloGLRr7P52XtDsTKtIPKqneflFwkH/ltiTH79fSsCQ3G555O2Y Plh9+MJ63KyEQuOJc5OhZbXYQF99UlFnB51Vd13g= 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.14 20/35] xtensa: xtfpga: Fix refcount leak bug in setup Date: Thu, 30 Jun 2022 15:46:31 +0200 Message-Id: <20220630133233.035122118@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220630133232.433955678@linuxfoundation.org> References: <20220630133232.433955678@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);