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: <201207201210.48030.rjw@sisk.pl>
Date:	Fri, 20 Jul 2012 12:10:47 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	MyungJoo Ham <myungjoo.ham@...sung.com>
Cc:	linux-kernel@...r.kernel.org, cpufreq@...r.kernel.org,
	linux-pm@...r.kernel.org, Jonghwa Lee <jonghwa3.lee@...sung.com>
Subject: Re: [RESEND PATCH] [CPUFREQ] EXYNOS: bugfix on retrieving old_index from freqs.old

On Friday, July 20, 2012, MyungJoo Ham wrote:
> From: Jonghwa Lee <jonghwa3.lee@...sung.com>
> 
> The policy might have been changed since last call of target().
> Thus, using cpufreq_frequency_table_target(), which depends on
> policy to find the corresponding index from a frequency, may return
> inconsistent index for freqs.old. Thus, old_index should be
> calculated not based on the current policy.
> 
> We have been observing such issue when scaling_min/max_freq were
> updated and sometimes cuased system lockups deu to incorrectly
> configured voltages.
> 
> Signed-off-by: MyungJoo Ham <myungjoo.ham@...sung.com>

Applied to the pm-cpufreq branch of the linux-pm.git tree, will be pushed
for v3.6.

Thanks,
Rafael


> ---
>  drivers/cpufreq/exynos-cpufreq.c |   14 ++++++++++++--
>  1 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
> index b243a7e..af2d81e 100644
> --- a/drivers/cpufreq/exynos-cpufreq.c
> +++ b/drivers/cpufreq/exynos-cpufreq.c
> @@ -62,8 +62,18 @@ static int exynos_target(struct cpufreq_policy *policy,
>  		goto out;
>  	}
>  
> -	if (cpufreq_frequency_table_target(policy, freq_table,
> -					   freqs.old, relation, &old_index)) {
> +	/*
> +	 * The policy max have been changed so that we cannot get proper
> +	 * old_index with cpufreq_frequency_table_target(). Thus, ignore
> +	 * policy and get the index from the raw freqeuncy table.
> +	 */
> +	for (old_index = 0;
> +		freq_table[old_index].frequency != CPUFREQ_TABLE_END;
> +		old_index++)
> +		if (freq_table[old_index].frequency == freqs.old)
> +			break;
> +
> +	if (freq_table[old_index].frequency == CPUFREQ_TABLE_END) {
>  		ret = -EINVAL;
>  		goto out;
>  	}
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ