Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2905977iog; Mon, 27 Jun 2022 05:30:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uwx80YntEz5no9fcUwf3Hqsqk4XDjGfHhfWgePS0ZIWH6nDRx6ejf1Q4lwxaYQtl92WBqA X-Received: by 2002:a05:6a00:139b:b0:525:3e1b:f630 with SMTP id t27-20020a056a00139b00b005253e1bf630mr14681108pfg.54.1656333029969; Mon, 27 Jun 2022 05:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333029; cv=none; d=google.com; s=arc-20160816; b=iG6/nRFFhVDF879OFv6+azkUBv3FKYSyRcTzKPSOijR8L70Vx4ByfrlSyVmQF4UBgC f88ty/4r/PTPD42mmf2px4QST/aQ2Dc6+bQyzvtZWMUOoN5tzmXo4fxlvQ/J1Jd+YPOh eWz/E1YKfMG9EKFvAbUmNQ3wbynj2MBDcEI7zK0rahrklZqiEefrbVo8F3oOSrZ04lii TyNXSGKuZcg8dCmwM/CG9U9aUCIwGObUCLshmTX4748Z3Y8pNH1aRCnLdTjC9ywSoeLz mxjjPhTpZdMTDGCRMaXrd/Iww3VJ+5O/yF7JofKKp4gJ95Meu389yQ0M5lZbYBWyLk2X vO0A== 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=BcF6cSp8BaBmnv0pEbNJHUwshRZSHbTG4/hddkOAduLroBgRSZ6SjfKQ5YM3U2ejg8 SLyed4Q/1y2emnrq0EPJHb499D97TKpjZus673WbQ7cuU47JPe6CZO9fdE9Zymkhs9p5 BH8V3U8NyATs3oilx1VDb5eyZm3huNu+dc7EWaBcUTRDOkyE+3+/pOIt1qk6AYyewTKQ mWk8am2iPefICOz85EwhBey6Q/UWHmXusISJNZcwopYU9lFVEWs4vA5pn6SGo3WUrWXi 9sGGvzdnQZupmpVHUmtbQzY/gMiBzO9W8+y0zublHOjBrYuPOOvPdUsbxIJeghMs5nf8 obug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U8kQ4pYS; 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 o18-20020a170902e29200b00168cca61b42si12366595plc.125.2022.06.27.05.30.17; Mon, 27 Jun 2022 05:30:29 -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=U8kQ4pYS; 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 S240125AbiF0L6s (ORCPT + 99 others); Mon, 27 Jun 2022 07:58:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238657AbiF0LwP (ORCPT ); Mon, 27 Jun 2022 07:52:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A468A46F; Mon, 27 Jun 2022 04:45:03 -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 012FAB80D92; Mon, 27 Jun 2022 11:45:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68A43C341C8; Mon, 27 Jun 2022 11:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656330300; bh=JyU7QdtanPItAWLFTxHBGyzoqPm3H0wGH2eLtiLYtEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U8kQ4pYSvA5lcIWjyDd3z5EDeohcqcBgIzxrXf+gC0C+eFRLwy+hr3lUrqvi7mX/M AVghXxo240We79FueZxCt8vLiXO+rs0BAXxD+GeIXoPwBepTq1a9QIfL14Lt5PRFoG yvT0UZ5U+k6/62OL2Rm+aj930vMdV3G1RVRX2MTw= 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.18 151/181] xtensa: xtfpga: Fix refcount leak bug in setup Date: Mon, 27 Jun 2022 13:22:04 +0200 Message-Id: <20220627111949.062172791@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111944.553492442@linuxfoundation.org> References: <20220627111944.553492442@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);