Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2910649iog; Mon, 27 Jun 2022 05:35:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tiR4iARd1RDv7am99G80XGv4hib7o+d9xDy/87KS43ORI9BqWj+8CKhKEMSX7hdz7TCa2u X-Received: by 2002:a05:6402:84f:b0:437:6293:d264 with SMTP id b15-20020a056402084f00b004376293d264mr15827336edz.317.1656333328991; Mon, 27 Jun 2022 05:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333328; cv=none; d=google.com; s=arc-20160816; b=GEkhAsAlivTjCgQnVZtAupeLVqd6JAdD2MUapIu+9y7eo99fKDiNDKjryZx3+Cbz8G aC+8dTQjYp7TV6qosJ6uCfdyk2CT5EjCfOSFNU5f324eyiqdDfbi1mmxdzrpv8Ahp77R 5EPYFn+fLw+nRp0A+hz/5VFf9sVw/0pbnCD9pOLXqnvb7hZDdyQhZKWT1NCy1/+FUBEx C+mqL691Stm5FODYEBDQeVoNL7skMDtKSh+RMzp1AHutgKY121fJAUH/QQyGWZhGgp4S m0naxT62iUFl677ubipfuWUO7Lwa7W0opz5UH1RBlxEUyKKApsY+Ydegxq78wUy5ODXz xOrg== 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=Rz2II4S9iAc0QECw86NYC6QhdmiRcpvGblAKDhdaRhE=; b=INXFM6jPpqHIxY//L0A6L/uN/Brq/nLh9/KHrk0/d0j8ZGgVmQmIvRmGE9nyeFNmDA lFdvszeLA71zS8qZpsbRDPcd6sQnFMx1BLG5GcbnM/2c0tXB9Z2ltb/1oMNwYqyEv4BG JIVUVPkJccIuJcWeRcb4dm3+a750JxT6zNlDyLtV+muZ6oRzjvl58KtQZ12mD7Vt6J4W V8T1Y5DXD0YQl0LxoYKsoWoBLHSvfs0HqA4Xuf25TPbXhcDlrg5p2+C6X6stu+yRrhqg 2K2zQe8dJGmayysT6Kq0yohagNWnK/CY1p3mTp+Dx8GvnopOe34EUrAAzWtFFgQHRB6Q 6yEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="m2/767sK"; 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 o30-20020a509b1e000000b00435d25ea11esi5691738edi.183.2022.06.27.05.35.02; Mon, 27 Jun 2022 05:35:28 -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="m2/767sK"; 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 S235393AbiF0Lfk (ORCPT + 99 others); Mon, 27 Jun 2022 07:35:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236132AbiF0LdR (ORCPT ); Mon, 27 Jun 2022 07:33:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E325BF6C; Mon, 27 Jun 2022 04:30:21 -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 50B9661494; Mon, 27 Jun 2022 11:30:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F3F0C3411D; Mon, 27 Jun 2022 11:30:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329420; bh=AnMJAmMUcYuIuEwfnCA8fZf9H/5ZJ1+zFyeoIm3LNko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m2/767sKJoSYaqU2o6PYoWwgTDTs/8gz6NxnIUZsM0objfqYxCpsxnpT1DOg7KMaq fBrQ8K+DmAyfv337QGNVwoBqjt+q6sl2edtcFJSFkWESV2TzkoJiBwGRDzZG/7CR1b Ny/1n0HzPddAzSWqRF8wGU2XmRx5tDKS3DaNvXXE= 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.4 46/60] xtensa: xtfpga: Fix refcount leak bug in setup Date: Mon, 27 Jun 2022 13:21:57 +0200 Message-Id: <20220627111929.043731752@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111927.641837068@linuxfoundation.org> References: <20220627111927.641837068@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 @@ -148,6 +148,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);