Skip to content

Commit

Permalink
percpu: fix percpu accessors to potentially !cpu_possible() cpus: pnp…
Browse files Browse the repository at this point in the history
…bios

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 <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Adam Belay <ambx1@neo.rr.com>
  • Loading branch information
Rusty Russell committed Dec 31, 2008
1 parent e9690a6 commit 6aaa8ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pnp/pnpbios/bioscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header)

set_base(bad_bios_desc, __va((unsigned long)0x40 << 4));
_set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4));
for (i = 0; i < NR_CPUS; i++) {
for_each_possible_cpu(i) {
struct desc_struct *gdt = get_cpu_gdt_table(i);
if (!gdt)
continue;
Expand Down

0 comments on commit 6aaa8ce

Please sign in to comment.