percpu: fix percpu accessors to potentially !cpu_possible() cpus: pnpbios
PATCH 2/3 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 Rusty Russell <[email protected]>
Signed-off-by Mike Travis <[email protected]>
Acked-by Ingo Molnar <[email protected]>
Cc Adam Belay <[email protected]>
--- drivers/pnp/pnpbios/bioscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pnp/pnpbios/bioscalls.c +1 -1
@@ -481,7 +481,7 @@ void pnpbios_calls_init(union pnp_bios_iset_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 ;