Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4628728iog; Wed, 22 Jun 2022 02:40:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1smMp/AaK/OpnBEN3XSA4zMWma5VCB2PTFsT2PA2MuRRvGne5gYLH0w0Usi3yC01+N6tiGM X-Received: by 2002:a17:90a:5309:b0:1ec:82a1:3b86 with SMTP id x9-20020a17090a530900b001ec82a13b86mr2855291pjh.54.1655890837039; Wed, 22 Jun 2022 02:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655890837; cv=none; d=google.com; s=arc-20160816; b=UD/0WBKSEtgRNEQBdNeyF5ZuaVkCWXvtSfR5L56MjTs7x2NYpoQ5fam6SqxBUoQg+S 5oWk+0ZUZyDLY9h+K8DiR4HYIwycE5r/2v7hI11zrpFPO93jomABVA8jogi8zptpi/dY JWdMlV18LEKR0wJaTviqwKGRZZlbzZN1vvY8Gk9Bl28QEQVM6wJtMbsNG6ZVtMRHcP9E 2QVdwHxJrSjZcUqMtZAXC6F2bI+NirbgSlvbUTq8YEhWRlQ2/qtk6i4ENkGvrkJN5eYd hgJ8G1FZ6+mASNCUs66QpcZel5UsoBgF6qcSRoCxOW4qKdG9rsJhDPRk3Fu62K9/n/8S d2lQ== 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:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=zFZQpZt13H/StCeJGXXiS7L/JZ9kSS18JM5BXN5HiQM=; b=fTjPPLh12goTQIbn89ckRSEK1L+CM6zsrJnZP6Lw8u2TvLske7rUBKFuprbzUSO3b3 2JIhkIjXQ7uTKi7RSi7eMq3yvJ+hjiChx8FrwgZhS9Do7B7bWA87G9wrufZo1FUGmheg 7b5lZX/l+t57Qs63fX+/DRG+LIY+SuF7xaiaumABDim+aAs2MQ/Z1f5+z9fsulgU6zsF g5iHeVaTj7CJhu47um61vWCeXTLv2MhyVV8lcHAD1PjTlETWeCYhAjO0olXUKoLADScW Z5hhBO+jHGFPEVL8t44xEDAxtQqdyrSli25/iCuyi3++zL2px+Gx8qBsnv9kvHqqAB4q RWoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CGM8U3aL; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k184-20020a6384c1000000b0040c9e0c3592si2898546pgd.715.2022.06.22.02.40.25; Wed, 22 Jun 2022 02:40:37 -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=@kernel.org header.s=k20201202 header.b=CGM8U3aL; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351393AbiFVJAc (ORCPT + 99 others); Wed, 22 Jun 2022 05:00:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355528AbiFVJA2 (ORCPT ); Wed, 22 Jun 2022 05:00:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC2D355B8; Wed, 22 Jun 2022 02:00:26 -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 56E086194A; Wed, 22 Jun 2022 09:00:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00244C34114; Wed, 22 Jun 2022 09:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655888425; bh=+o6AzCltYmzNj6+UMQx53ncNraIROmp0UBLjznmFdx0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=CGM8U3aLJJzCXJ3yTedeRPmHUYYa8QTAJGQhU1NuT54wJJI2EMlaPXXyvuJr6jAxB 7jIV3J/o0WANOAYacXDzolim3SaDfQqTLU7iR+pw/xnYCFXAS0sPqFC2NuW5LOnXew PjelVdFIXWAxPMhiD/TwctH51T9nEBSrO8m3p27oMQh9ajl2ajvs8i1UipmbfPhj/y TSzfhctCotuKElR6KnR2NEgAL4CbHi+bMaY4yH2c6boss5G3hRu4ikmo/fEhChXpdu 6nfRhRADLGGqjMbaRFpY4ZA3Q7FKmABZEF7xw4YwRaFZTN2PoKCj0QSC2mwZRLCphX diCmxDZq2MVRw== Message-ID: Date: Wed, 22 Jun 2022 11:00:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] arm/mach-omap2: Fix refcount leak bug in omap_hwmod.c Content-Language: en-US To: Liang He , tony@atomide.com, linux@armlinux.org.uk Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220618014747.4055279-1-windhl@126.com> From: Krzysztof Kozlowski In-Reply-To: <20220618014747.4055279-1-windhl@126.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 On 18/06/2022 03:47, Liang He wrote: > In _init(), of_find_node_by_name() will return a node pointer with > refcount incremented. We should use of_node_put() in fail path or > when it is not used anymore. > > NOTE: As the ref will be passed from 'bus' to 'np' by the xx_lookup(), > in normal exit path, we should call of_node_put() at the end use of 'np', > not the end use of 'bus'. > > Signed-off-by: Liang He > --- > arch/arm/mach-omap2/omap_hwmod.c | 4 ++++ > 1 file changed, 4 insertions(+) > Before applying the patch please check it carefully. Previous evidence [1][2] suggests that not it was not even compiled. [1] https://lore.kernel.org/all/202206221602.odN70SHs-lkp@intel.com/ [2] https://lore.kernel.org/all/16f9a971.44e5.1817068ee3c.Coremail.windhl@126.com/ Best regards, Krzysztof