lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240809072109.ygel62d4333shkrw@vireshk-i7>
Date: Fri, 9 Aug 2024 12:51:09 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>
Cc: ray.huang@....com, gautham.shenoy@....com, mario.limonciello@....com,
	perry.yuan@....com, rafael@...nel.org, li.meng@....com,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()

On 09-08-24, 06:08, Dhananjay Ugwekar wrote:
> Fix the reference counting of cpufreq_policy object in amd_pstate_update()
> function by adding the missing cpufreq_cpu_put().
> 
> Fixes: e8f555daacd3 ("cpufreq/amd-pstate: fix setting policy current frequency value")
> Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>
> Reviewed-by: Perry Yuan <perry.yuan@....com>
> ---
>  drivers/cpufreq/amd-pstate.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 68c616b572f2..eff039ba49ee 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -554,12 +554,15 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
>  	}
>  
>  	if (value == prev)
> -		return;
> +		goto cpufreq_policy_put;
>  
>  	WRITE_ONCE(cpudata->cppc_req_cached, value);
>  
>  	amd_pstate_update_perf(cpudata, min_perf, des_perf,
>  			       max_perf, fast_switch);
> +
> +cpufreq_policy_put:
> +	cpufreq_cpu_put(policy);
>  }
>  
>  static int amd_pstate_verify(struct cpufreq_policy_data *policy)

Applied. Thanks.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ