From: Rusty Russell Date: Wed, 31 Dec 2008 23:42:14 +0000 (+1030) Subject: percpu: fix percpu accessors to potentially !cpu_possible() cpus: pnpbios X-Git-Tag: v2.6.29-rc1~521^2~11^2~30 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6aaa8ce523c7ce954b81b8c0b3e32c8be599af8d;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Mike Travis Acked-by: Ingo Molnar Cc: Adam Belay --- diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c index 7ff824496b3..7e6b5a3b328 100644 --- a/drivers/pnp/pnpbios/bioscalls.c +++ b/drivers/pnp/pnpbios/bioscalls.c @@ -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;