Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2901417iog; Mon, 27 Jun 2022 05:24:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vTJzx5aSOnQ75P//VEdYnm7SJzSQz29ar3L1Oyg4CW22OOIRF1HKoNubILnrvB263ceLiq X-Received: by 2002:a05:6402:500b:b0:431:78d0:bf9d with SMTP id p11-20020a056402500b00b0043178d0bf9dmr16044728eda.184.1656332664851; Mon, 27 Jun 2022 05:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656332664; cv=none; d=google.com; s=arc-20160816; b=gBbOWGoL5I1QmOnXQD/fNzBB9sSKyt32Jr/1V/WntzU2+hvQ0aMtiaESBwCIUY/0oZ 3ginEAXp/gLUddrmbizcsKS7xWsuQO8y2R0nJS7bTfCbKmQo20fFNq8ZN+EUXOtOiY9A P82YT+qjiaBa4YYp0cgtE0UXcsSDrAcPYweJngNm4Qq18MF34gUMJS1hDgTIGhVw7544 ePJ/E8JxDJ70LicQf7CaL9ILKMUuenJx1+17NHNxZVapijjrTBG3SjkXFJfVhh/BZBKr vnfHDMVABy4YJAHyXVEcsNrGpryo0fcZakER3ttO0f7xfoCsTBK6/geKvHsfBZADFSzR vHIw== 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=mMNoOe1uAJklgT36XjQzpaHkY3VryiSJpFgPViGWbIM=; b=oVX0YP8Ob83n5R6jH4QSBaunSj77sU1mu/CwpT4larCvAk6G+FNQDpKG75qvYCrWBu fDRnv8h1ZSRfV/74Z20GW348HQmVxf53fobU9YnVT8dRSdp5VIYtGCnRVxeo+j3O0Ago rL4xbM5RNl62WmMLhx7Vc+19/SDECcXL7aa13rxt/4UOuZFfTDkyyrwoNpJszvaZ/4vO u9usNIQTH58zaYr9dSM6+oEez5ifCrhSA2EMwK44rJk/5qWXOCKyn4+L2P/tOOcD46Tp aaUsOWJIDHP7K9bdqdMB3q6EN10d714JZY2uYsg0igRH+NJeD/uJpINT1tGHl5cYsx08 GNEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qdIhC73Z; 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 c13-20020a50f60d000000b0042dd46e6590si6973236edn.336.2022.06.27.05.24.00; Mon, 27 Jun 2022 05:24:24 -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=qdIhC73Z; 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 S235465AbiF0L3e (ORCPT + 99 others); Mon, 27 Jun 2022 07:29:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235285AbiF0L24 (ORCPT ); Mon, 27 Jun 2022 07:28:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 905B09FC3; Mon, 27 Jun 2022 04:27:40 -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 2CBA6B81123; Mon, 27 Jun 2022 11:27:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72A28C3411D; Mon, 27 Jun 2022 11:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329257; bh=JyU7QdtanPItAWLFTxHBGyzoqPm3H0wGH2eLtiLYtEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qdIhC73Z8kKgUZRC89dLGiJjd9y02mXi8AntRQjErOHwwc9XIxQkoJMM/9eHX9YHe nQXLRZXqdA92TClGeChIQ/rnf+zY03Og1SJJ3E0QGpnEySWOCmcbRzyIJFjIxnT/Mj RqFVdD1TmnRPvfnSo1xxmn6LJT8hTuG1se9TK+5Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liang He , Max Filippov Subject: [PATCH 5.10 085/102] xtensa: xtfpga: Fix refcount leak bug in setup Date: Mon, 27 Jun 2022 13:21:36 +0200 Message-Id: <20220627111935.987878420@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111933.455024953@linuxfoundation.org> References: <20220627111933.455024953@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 @@ -133,6 +133,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);