Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1051681rdb; Fri, 1 Dec 2023 06:02:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYhLOwgXitNsimUI/l7ay4oNaTc6ZtpDcSITNktVJwATS/8DyYPquMcZWct1QMZd94dPB4 X-Received: by 2002:a17:902:e54b:b0:1ce:6589:d1c0 with SMTP id n11-20020a170902e54b00b001ce6589d1c0mr30781772plf.46.1701439331734; Fri, 01 Dec 2023 06:02:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701439331; cv=none; d=google.com; s=arc-20160816; b=0qiKUzvYOqW6Yc6bftp6FRJPzQaX7glMmc/OkgXUcCjmktXnWXdS6wuMoD+XtSMxIh b0xal2Cp140lJVjeo12fnACleu1W34R/LqhEPxvNHhCsaohbJkveKorxHxHaDafQkudd lSmwVCcyab/A5HxrNp1uqoL4eY0DyGdwFSqFlai8XxmsAr01rBx/y1f+7EMdFdMA6xl3 DVzoVZkAIiOrinMmhmO/g/WgTe8eeVWOAj2twKWxnpAZscbKiYKR4SA5/IbSp4M6D7yF rHNERajuwz/tEHjQebxG0gqsSntsfXVCfFTgFuyRoRunUkvttSLC6D7LmJ9vWgKmYueM pINA== 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; bh=81sAlBkq3WAQIuHmKdN+hpXtuoih88dq1ru3rhQlDXo=; fh=3Ob+2g0UTkVDNuxBZP/6tIt9kqMB2Bu8XM7Gk1cyJrs=; b=O+Q8gnyMt/Z8mlKzwN0P1CmpxmMx/zvxyO+GlYUV5RBLQE/lywkRjsaLVEDZjk1ZQ1 TSb/w2B31zDz3ORNKpGlhmogS14gpoV5ak/0y9b6LKw24sFR9rRqeYzm91FEJYC7V9s2 ZTaxOWetgtB8DVHldaFq+/ubAtyb0e1rbkJaYKELbeeuWjnlpIvWXsny2zCVkFRP5oNW mzTgq3kShfcRTUG9bQp130exZ2ha9uFdccpCOZTOefX5o3a+OxPegeGJYAySFo2XcbIr LRRWJho3xt3B1hCp1Kn0MPWk9iK3O83dPWJs+bb+LWCxuxedZDqBj32zCyHRiNP34Y1g 3UZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k18-20020a170902c41200b001d0550153a2si1172815plk.500.2023.12.01.06.01.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 06:02:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9CC27817C8B0; Fri, 1 Dec 2023 06:01:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379091AbjLAOBf (ORCPT + 99 others); Fri, 1 Dec 2023 09:01:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379060AbjLAOBe (ORCPT ); Fri, 1 Dec 2023 09:01:34 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D808994; Fri, 1 Dec 2023 06:01:40 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1634B1007; Fri, 1 Dec 2023 06:02:27 -0800 (PST) Received: from [10.57.4.62] (unknown [10.57.4.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 91D5F3F73F; Fri, 1 Dec 2023 06:01:39 -0800 (PST) Message-ID: Date: Fri, 1 Dec 2023 14:02:38 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] powercap: DTPM: Fix the missing cpufreq_cpu_put() calls Content-Language: en-US To: Greg KH Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, daniel.lezcano@linaro.org, rafael@kernel.org, stable@vger.kernel.org References: <20231201123205.1996790-1-lukasz.luba@arm.com> <2023120139-staging-sprang-7e77@gregkh> From: Lukasz Luba In-Reply-To: <2023120139-staging-sprang-7e77@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 01 Dec 2023 06:01:49 -0800 (PST) Hi Greg, On 12/1/23 12:44, Greg KH wrote: > On Fri, Dec 01, 2023 at 12:32:05PM +0000, Lukasz Luba wrote: >> The policy returned by cpufreq_cpu_get() has to be released with >> the help of cpufreq_cpu_put() to balance its kobject reference counter >> properly. >> >> Add the missing calls to cpufreq_cpu_put() in the code. >> >> Fixes: 0aea2e4ec2a2 ("powercap/dtpm_cpu: Reset per_cpu variable in the release function") >> Fixes: 0e8f68d7f048 ("powercap/drivers/dtpm: Add CPU energy model based support") >> Cc: # v5.10+ > > But the Fixes: tags are for commits that are only in 5.12 and newer, how > can this be relevant for 5.10? My apologies, you're right. Somehow I checked that this dtpm_cpu.c was introduced in v5.10. It was in v5.12 indeed. I messed that up. Also, the code in that v5.12 had different implementation and there was a function cpuhp_dtpm_cpu_offline() which had the cpufreq_cpu_get(). I can craft for that v5.12 special extra patch fix addressing it and send directly to stable list. Would that make sense? So this patch would only be applicable for v5.16+ AFAICS. Regards, Lukasz