Commit-ID:  acfcdccea94ed09cc2c20afbc5dca5bc6a6d69c7
Gitweb:     http://git.kernel.org/tip/acfcdccea94ed09cc2c20afbc5dca5bc6a6d69c7
Author:     Dan Carpenter <dan.carpen...@oracle.com>
AuthorDate: Sat, 15 Nov 2014 21:57:18 +0300
Committer:  Thomas Gleixner <t...@linutronix.de>
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.carpen...@oracle.com>
Cc: Andi Kleen <a...@linux.intel.com>
Cc: lgu...@lists.ozlabs.org
Cc: Rusty Russell <ru...@rustcorp.com.au>
Cc: Jan Beulich <jbeul...@suse.com>
Link: http://lkml.kernel.org/r/20141115185718.GB6530@mwanda
Signed-off-by: Thomas Gleixner <t...@linutronix.de>
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to