Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] cpufreq: SMP fix for conservative governor

Don't try to access not-present CPUs. Conservative governor will always
oops on SMP without this fix.

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=4781

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Dave Jones and committed by
Linus Torvalds
92732144 79b95a45

+3 -3
+3 -3
drivers/cpufreq/cpufreq_conservative.c
··· 315 315 policy = this_dbs_info->cur_policy; 316 316 317 317 if ( init_flag == 0 ) { 318 - for ( /* NULL */; init_flag < NR_CPUS; init_flag++ ) { 319 - dbs_info = &per_cpu(cpu_dbs_info, init_flag); 320 - requested_freq[cpu] = dbs_info->cur_policy->cur; 318 + for_each_online_cpu(j) { 319 + dbs_info = &per_cpu(cpu_dbs_info, j); 320 + requested_freq[j] = dbs_info->cur_policy->cur; 321 321 } 322 322 init_flag = 1; 323 323 }