All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org
Subject: Re: [PATCH 2/2] cpufreq: prevent lockup on reading scaling_available_frequencies
Date: Thu, 8 Oct 2015 00:02:00 +0530	[thread overview]
Message-ID: <20151007183200.GJ4557@linux> (raw)
In-Reply-To: <1443738182-4077-2-git-send-email-srinivas.pandruvada@linux.intel.com>

On 01-10-15, 15:23, Srinivas Pandruvada wrote:
> When scaling_available_frequencies is read on an offlined cpu, then
> either lockup or junk values are displayed. This is caused by
> freed freq_table, which policy is using.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
>  drivers/cpufreq/cpufreq.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index ef5ed94..25c4c15 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1436,8 +1436,10 @@ static void cpufreq_offline_finish(unsigned int cpu)
>  	 * since this is a core component, and is essential for the
>  	 * subsequent light-weight ->init() to succeed.
>  	 */
> -	if (cpufreq_driver->exit)
> +	if (cpufreq_driver->exit) {
>  		cpufreq_driver->exit(policy);
> +		policy->freq_table = NULL;
> +	}
>  }

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

  parent reply	other threads:[~2015-10-07 18:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 22:23 [PATCH 1/2] cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus Srinivas Pandruvada
2015-10-01 22:23 ` [PATCH 2/2] cpufreq: prevent lockup on reading scaling_available_frequencies Srinivas Pandruvada
2015-10-07 12:45   ` Viresh Kumar
2015-10-07 16:18     ` Srinivas Pandruvada
2015-10-07 17:03       ` Viresh Kumar
2015-10-07 18:05         ` Srinivas Pandruvada
2015-10-07 18:32   ` Viresh Kumar [this message]
2015-10-07 12:19 ` [PATCH 1/2] cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus Viresh Kumar
2015-10-07 15:34   ` Srinivas Pandruvada

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=20151007183200.GJ4557@linux \
    --to=viresh.kumar@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.