mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1 v2] x86, acpi: Fix wrong checking condition in acpi_register_lapic().
@ 2013-07-23  8:00 Tang Chen
  2013-07-24  3:54 ` [tip:x86/apic] x86/acpi: Fix incorrect sanity check " tip-bot for Tang Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Tang Chen @ 2013-07-23  8:00 UTC (permalink / raw)
  To: len.brown, pavel, rjw, tglx, mingo, hpa, x86, linux-pm, linux-kernel

We wanted to check if the acpi id is out of range. It should be:
	if (id >= MAX_LOCAL_APIC).

v1 -> v2:
Remove the superfluous parentheses around MAX_LOCAL_APIC.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Reviewed-by: Len Brown <len.brown@intel.com>
---
 arch/x86/kernel/acpi/boot.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index d81a972..256479d 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -199,7 +199,7 @@ static void __cpuinit 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;
 	}
-- 
1.7.10.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:x86/apic] x86/acpi: Fix incorrect sanity check in acpi_register_lapic()
  2013-07-23  8:00 [PATCH 1/1 v2] x86, acpi: Fix wrong checking condition in acpi_register_lapic() Tang Chen
@ 2013-07-24  3:54 ` tip-bot for Tang Chen
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Tang Chen @ 2013-07-24  3:54 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tangchen, tglx, len.brown

Commit-ID:  82982d729319e975115d88cae4927dffb02bfea7
Gitweb:     http://git.kernel.org/tip/82982d729319e975115d88cae4927dffb02bfea7
Author:     Tang Chen <tangchen@cn.fujitsu.com>
AuthorDate: Tue, 23 Jul 2013 16:00:19 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 23 Jul 2013 10:08:16 +0200

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>
---
 arch/x86/kernel/acpi/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 2627a81..872a2d2 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -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;
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-24  3:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-23  8:00 [PATCH 1/1 v2] x86, acpi: Fix wrong checking condition in acpi_register_lapic() Tang Chen
2013-07-24  3:54 ` [tip:x86/apic] x86/acpi: Fix incorrect sanity check " tip-bot for Tang Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome