x86/acpi: Fix incorrect sanity check in acpi_register_lapic()

We wanted to check if the APIC ID is out of range. It should be:

	if (id >= MAX_LOCAL_APIC)

There's no known bad effect of this bug.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Cc: pavel@ucw.cz
Cc: rjw@sisk.pl
Link: http://lkml.kernel.org/r/1374566419-21120-1-git-send-email-tangchen@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Tang Chen 2013-07-23 16:00:19 +08:00 committed by Ingo Molnar
parent b3a3a9c441
commit 82982d7293
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ static void acpi_register_lapic(int id, u8 enabled)
{
unsigned int ver = 0;
if (id >= (MAX_LOCAL_APIC-1)) {
if (id >= MAX_LOCAL_APIC) {
printk(KERN_INFO PREFIX "skipped apicid that is too big\n");
return;
}