Skip to content

Commit

Permalink
percpu: fix percpu accessors to potentially !cpu_possible() cpus: m32r
Browse files Browse the repository at this point in the history
Impact: CPU iterator bugfixes

Percpu areas are only allocated for possible cpus.  In general, you
shouldn't access random cpu's percpu areas.

Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Mike Travis <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Acked-by: Hirokazu Takata <[email protected]>
  • Loading branch information
rustyrussell committed Dec 31, 2008
1 parent 6aaa8ce commit 9e2f913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/m32r/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ int setup_profiling_timer(unsigned int multiplier)
* accounting. At that time they also adjust their APIC timers
* accordingly.
*/
for (i = 0; i < NR_CPUS; ++i)
for_each_possible_cpu(i)
per_cpu(prof_multiplier, i) = multiplier;

return 0;
Expand Down

0 comments on commit 9e2f913

Please sign in to comment.