[tip:x86/apic] x86: lguest: interrupt[] array size has changed
From: tip-bot for Dan Carpenter
Date: Sun Nov 16 2014 - 13:19:03 EST
Commit-ID: acfcdccea94ed09cc2c20afbc5dca5bc6a6d69c7
Gitweb: http://git.kernel.org/tip/acfcdccea94ed09cc2c20afbc5dca5bc6a6d69c7
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
AuthorDate: Sat, 15 Nov 2014 21:57:18 +0300
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Sun, 16 Nov 2014 19:14:51 +0100
x86: lguest: interrupt[] array size has changed
Smatch complains that there is a buffer overflow here because we
recently changed interrupt[] from having "NR_VECTORS -
FIRST_EXTERNAL_VECTOR" elements to now have "FIRST_SYSTEM_VECTOR -
FIRST_EXTERNAL_VECTOR" elements.
Fixes: 8c66877ee65e ('x86: Avoid building unused IRQ entry stubs')
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: lguest@xxxxxxxxxxxxxxxx
Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Link: http://lkml.kernel.org/r/20141115185718.GB6530@mwanda
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
arch/x86/lguest/boot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index aae9413..c1c1544 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -841,7 +841,7 @@ static void __init lguest_init_IRQ(void)
{
unsigned int i;
- for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
+ for (i = FIRST_EXTERNAL_VECTOR; i < FIRST_SYSTEM_VECTOR; i++) {
/* Some systems map "vectors" to interrupts weirdly. Not us! */
__this_cpu_write(vector_irq[i], i - FIRST_EXTERNAL_VECTOR);
if (i != SYSCALL_VECTOR)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/