From: Vincent Donnefort <vincent.donnefort@arm.com>
To: Pierre Gondois <pierre.gondois@arm.com>, linux-kernel@vger.kernel.org
Cc: cristian.marussi@arm.com, Ionela.Voinescu@arm.com,
Dietmar.Eggemann@arm.com, "Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v1] PM: EM: Decrement policy counter
Date: Tue, 26 Apr 2022 16:40:32 +0100 [thread overview]
Message-ID: <8ee5dfd0-558b-5ad6-63d2-b142550f04a3@arm.com> (raw)
In-Reply-To: <20220426144448.43682-1-pierre.gondois@arm.com>
On 26/04/2022 15:44, Pierre Gondois wrote:
> From: Pierre Gondois <Pierre.Gondois@arm.com>
>
> Fixes: e458716a92b57 ("PM: EM: Mark inefficiencies in CPUFreq")
> In the above commit, cpufreq_cpu_get() is called without
> a cpufreq_cpu_put(), permanently increasing the reference counts
> of the policy struct.
> Decrement the reference count once the policy struct is not used
> anymore.
Not sure if the tag there will be caught properly. Usually it goes on
top of the Signed-off-by.
While at it:
Reviewed-by: Vincent Donnefort <vincent.donnefort@arm.com>
Thanks for fixing this.
>
> Tested-by: Cristian Marussi <cristian.marussi@arm.com>
> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
> ---
> kernel/power/energy_model.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/power/energy_model.c b/kernel/power/energy_model.c
> index 0153b0ca7b23..6219aaa454b5 100644
> --- a/kernel/power/energy_model.c
> +++ b/kernel/power/energy_model.c
> @@ -259,6 +259,8 @@ static void em_cpufreq_update_efficiencies(struct device *dev)
> found++;
> }
>
> + cpufreq_cpu_put(policy);
> +
> if (!found)
> return;
>
next prev parent reply other threads:[~2022-04-26 15:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 14:44 Pierre Gondois
2022-04-26 15:40 ` Vincent Donnefort [this message]
2022-05-11 17:17 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ee5dfd0-558b-5ad6-63d2-b142550f04a3@arm.com \
--to=vincent.donnefort@arm.com \
--cc=Dietmar.Eggemann@arm.com \
--cc=Ionela.Voinescu@arm.com \
--cc=cristian.marussi@arm.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=pierre.gondois@arm.com \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®