Commit 6aaa8ce5 authored by Rusty Russell's avatar Rusty Russell

percpu: fix percpu accessors to potentially !cpu_possible() cpus: pnpbios

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: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarMike Travis <travis@sgi.com>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Cc: Adam Belay <ambx1@neo.rr.com>
parent e9690a6e
...@@ -481,7 +481,7 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header) ...@@ -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_base(bad_bios_desc, __va((unsigned long)0x40 << 4));
_set_limit((char *)&bad_bios_desc, 4095 - (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); struct desc_struct *gdt = get_cpu_gdt_table(i);
if (!gdt) if (!gdt)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment