Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp92458iof; Sun, 5 Jun 2022 22:07:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9oLmNYpW/TtnB+X/IyuzpZ41fp6c7FNOs3Icaw+M/XWHFFXtKQEdrVaoS1IM61GAvYNvW X-Received: by 2002:a63:f506:0:b0:3fc:962b:6e02 with SMTP id w6-20020a63f506000000b003fc962b6e02mr19612039pgh.266.1654492039575; Sun, 05 Jun 2022 22:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654492039; cv=none; d=google.com; s=arc-20160816; b=d63ABXyR/LVTQ9We05/PeRtRxHAyX86d4rzVVJ2TLYJKnwogkqJFoEe4Po1Wbu+Kd4 nsQvqUIRZ+NYPOCDwDV7vLFx7OXFHQRO1Pe4U7ODdMqBvdSmmi7+LhvERm7EJzR7daD8 X9kArc74JoA4M26rPhgaK0HGnKI/M3WQBqebO+PZ8j7sVfMDT62wPtNZc3DXURmwH+Qr WYtrR/zsMKl9HC9cPufYE48EPCaG9IJauOPPQmeNmRBX63OTFm8B7cSaeW9nD0ugd9Yc MzBEBaz6J/MmXZ6k7xfO6iD+sS48uBlBp8HsC3EzWYl0IADMpPAY6dXkunGYg9hsQ8xG ANbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=Nb946ADPU8+F5cp0E+j5t/xiaYdvwB7u7ZX/wWM6fZs=; b=KYH6adNYc5ZYeq+j3vjnxuIHQZOrEpZzfomvESrOYYNkCIOq6kWhNWYP+oqb44HcRN CKf4nTPOlx4WSPofATPTlXgSzQ0jtEFDblyEhZbIMcbjo+ExIJ/8WJOrpSFlxNMJ4tKm /Q8vDdqdfnH0a1xDy9ybN0Q0gwzoMeGpWvHpgm7zPfbxXC3R5zS6kuD3EYlQZF6kuFa8 vLVsIdamNON8FhTKTJtjZd9fwLgyawerJW0Rh2mPpgn5UKqij5g35JX6wVYnkpagm2vZ 3pUguedoNxXHFaGdEP1SArLK+Cyf9SA0uABL7Sduo9oaaXM6427KLIV5jL5c/MOSz+tU TNYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=bhzEdrT7; dkim=neutral (no key) header.i=@ravnborg.org header.b=s9zwhB7y; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id y5-20020a17090322c500b0015838a4fd9dsi21128377plg.64.2022.06.05.22.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:07:19 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=bhzEdrT7; dkim=neutral (no key) header.i=@ravnborg.org header.b=s9zwhB7y; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3513713B2F2; Sun, 5 Jun 2022 21:16:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343813AbiFEHs0 (ORCPT + 99 others); Sun, 5 Jun 2022 03:48:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231497AbiFEHsU (ORCPT ); Sun, 5 Jun 2022 03:48:20 -0400 Received: from mailrelay4-1.pub.mailoutpod1-cph3.one.com (mailrelay4-1.pub.mailoutpod1-cph3.one.com [46.30.210.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81A4A26121 for ; Sun, 5 Jun 2022 00:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=Nb946ADPU8+F5cp0E+j5t/xiaYdvwB7u7ZX/wWM6fZs=; b=bhzEdrT76xVrGwzdECLBx2qcs7fOPfbDZNBxVC+SLhK6o0kvAUUX4WUOc2TPcGBeiQB+357HgkG5z GHdnIh0xTFew95Zxb3GKCa+b2lzutS8P8shd+SuKhgfd8ywctHXQGlnH9BF5g7MZrnqxpCglEq/ed2 4n5L6L0CiObwis86n47v/RgNc4tvRpCkmzpleVEi98yaw0xRqv3w7X26zsAWhok25zYyHVh4KtGbUv KM7uBCKV2hB0Xjzo7nBuHm6nIbWizTjVvg80WxKGmTo/iANAMCTxfO/B+JzQn6hPgWaWgf1TRlxXA2 B4zEdYjh3g8gx6kSrnc2IQ85iW2XiqQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=Nb946ADPU8+F5cp0E+j5t/xiaYdvwB7u7ZX/wWM6fZs=; b=s9zwhB7yQlTyveNdqGSACc4SeMy8tUDMCXEgHqEGV3IU1PaGEN4OS6oaXLk4WOYA15JLebeOOppBW O7oEe7oDQ== X-HalOne-Cookie: 5bac6b0e734b689d45c0ffd4db3f3b5ce36b8985 X-HalOne-ID: daab1d3c-e4a3-11ec-8231-d0431ea8bb10 Received: from mailproxy2.cst.dirpod3-cph3.one.com (80-162-45-141-cable.dk.customer.tdc.net [80.162.45.141]) by mailrelay4.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id daab1d3c-e4a3-11ec-8231-d0431ea8bb10; Sun, 05 Jun 2022 07:48:14 +0000 (UTC) Date: Sun, 5 Jun 2022 09:48:12 +0200 From: Sam Ravnborg To: Miaoqian Lin Cc: "David S. Miller" , Daniel Hellstrom , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sparc32,leon: Fix reference leak in leon_ipi_init Message-ID: References: <20220605052943.54265-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220605052943.54265-1-linmq006@gmail.com> X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLACK autolearn=no 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 On Sun, Jun 05, 2022 at 09:29:41AM +0400, Miaoqian Lin wrote: > of_find_node_by_path() returns a node pointer with > refcount incremented, we should use of_node_put() on it when done. > Add missing of_node_put() to avoid refcount leak. > > Fixes: 1ca0c808c60f ("sparc32,leon: Implemented SMP IPIs for LEON CPU") > Signed-off-by: Miaoqian Lin The patch is finei, thanks: Acked-by: Sam Ravnborg All other uses of of_find_node_by_path() in sparc has the same issue. Could you try to take a look at the rest too? Sam > --- > arch/sparc/kernel/leon_smp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c > index 1eed26d423fb..85b22669c002 100644 > --- a/arch/sparc/kernel/leon_smp.c > +++ b/arch/sparc/kernel/leon_smp.c > @@ -284,6 +284,7 @@ static void __init leon_ipi_init(void) > pp = of_find_property(rootnp, "ipi_num", &len); > if (pp && (*(int *)pp->value)) > leon_ipi_irq = *(int *)pp->value; > + of_node_put(rootnp); > } > printk(KERN_INFO "leon: SMP IPIs at IRQ %d\n", leon_ipi_irq); > > -- > 2.25.1