Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1023002iob; Fri, 13 May 2022 20:01:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh4kIGtDL0cNtOFbbHWT6PlB+rfmJDLITMEoa7S7LUXmMYFL0UX5FmY6vzmOOnH6I5LsRL X-Received: by 2002:adf:f14a:0:b0:20a:d7bd:a5d4 with SMTP id y10-20020adff14a000000b0020ad7bda5d4mr6053606wro.390.1652497286547; Fri, 13 May 2022 20:01:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652497286; cv=none; d=google.com; s=arc-20160816; b=BeuQudK3aYA3N2jRIgoq/dKGZA0DeIPFdkRjbU43hsQgC75uawwtf7/GVRlCyejBnY RyVdzAfiXqNY3VEsS0RMDzfT5FBDIZhkNRIfNvY537ctMduJ6zaSQsRH/Dq9gRx6OR+R fD/8FHda+zFtpV6EJ9zLPyLO1fM6ndA9FQibvxdnRw9SSLxh3ID+uhUe8O9XNvidY92z ujDtGnWg0Jt7/r1QK6BEScoQ1yrYoJMjox1J1wyoEb72VZcRg4L9OFnkK4sLFisirlCn 4WKRSiIiQFY2YLTbyvymV10JwG5BCEmwKgRAsK8WnQ+KI1sKl6zHr6/wHLV/Fku2uhOP 9J8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=BeoSljv0xSEcGuBOT+V+6cxNCk+Hw/9IXsJIN2g6FsM=; b=LqUTuTXjFundYXo25JfnUiRyQ1HhLcw3Pcyuw2TmvB5tvnwsSCH09I+RieKZGJuIBi fj+QfO6jmmfUUcDmsNAxkMa3FPv/jc+NKFxOXi4lNI6r0ADs1el3qMYkYJ/2TiFgnoPv B4lFhpLPvYJ/jLcAaRN3j9LDVuefRjJnG1/V063zurw2wcMoWbznDWEb6A1KSko7CwJP 1YtxuoXT7M63x5Tm2dF39ju1ec6SG9nWalMltKOht0p30dSdkHDLfZai+000cNHaZELZ wu4Y2eSm7Zey5roZHpZXnmrn5EfNyumxQy2zw0Z+P3KA0jD1fb34Klu0HBJNWcqeUI39 371Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i20-20020a05600c051400b0038cabf05ebcsi3658018wmc.158.2022.05.13.20.01.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 20:01:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C40853A3A04; Fri, 13 May 2022 16:44:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377461AbiEMGwD (ORCPT + 99 others); Fri, 13 May 2022 02:52:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244239AbiEMGwC (ORCPT ); Fri, 13 May 2022 02:52:02 -0400 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BEF12266E14 for ; Thu, 12 May 2022 23:51:59 -0700 (PDT) Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 13 May 2022 15:51:58 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id 8CEB22058443; Fri, 13 May 2022 15:51:58 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Fri, 13 May 2022 15:51:58 +0900 Received: from [10.212.8.203] (unknown [10.212.8.203]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 0B60CB62B7; Fri, 13 May 2022 15:51:58 +0900 (JST) Message-ID: <0b323f86-79e3-f219-58d2-0a48330b92e4@socionext.com> Date: Fri, 13 May 2022 15:51:57 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH] ARM: milbeaut: Fix refcount leak in m10v_smp_init Content-Language: en-US To: Miaoqian Lin , Russell King , Takao Orito , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220512081554.28562-1-linmq006@gmail.com> From: Sugaya Taichi In-Reply-To: <20220512081554.28562-1-linmq006@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Thank you for the patch! Acked-by: Sugaya Taichi On 2022/05/12 17:15, Miaoqian Lin wrote: > of_find_compatible_node() 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: 9fb29c734f9e ("ARM: milbeaut: Add basic support for Milbeaut m10v SoC") > Signed-off-by: Miaoqian Lin > --- > arch/arm/mach-milbeaut/platsmp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/mach-milbeaut/platsmp.c b/arch/arm/mach-milbeaut/platsmp.c > index 3ea880f5fcb7..1f1ff21c7140 100644 > --- a/arch/arm/mach-milbeaut/platsmp.c > +++ b/arch/arm/mach-milbeaut/platsmp.c > @@ -53,6 +53,7 @@ static void m10v_smp_init(unsigned int max_cpus) > return; > > m10v_smp_base = of_iomap(np, 0); > + of_node_put(np); > if (!m10v_smp_base) > return; > >