]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] x86_64: Fix fast check in safe_smp_processor_id
authorAndi Kleen <ak@suse.de>
Mon, 26 Jun 2006 11:59:17 +0000 (13:59 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 17:48:21 +0000 (10:48 -0700)
commitd61d5668d40e4b4a21ac3f49134d1078ad4a3f4f
treeddfd134ef54138eea8e341039466c7e470203c71
parent834e237f593b7c3dce593b321aafbbe9e7c8c0d1
[PATCH] x86_64: Fix fast check in safe_smp_processor_id

The APIC ID returned by hard_smp_processor_id can be beyond
NR_CPUS and then overflow the x86_cpu_to_apic[] array.

Add a check for overflow. If it happens then the slow loop below
will catch.

Bug pointed out by Doug Thompson

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/smp.c