Skip to content

Commit

Permalink
x86/acpi: Fix incorrect sanity check in acpi_register_lapic()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tang Chen authored and Ingo Molnar committed Jul 23, 2013
1 parent b3a3a9c commit 82982d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 82982d7

Please sign in to comment.