public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Dan Carpenter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: ak@linux.intel.com, hpa@zytor.com, tglx@linutronix.de,
	mingo@kernel.org, linux-kernel@vger.kernel.org,
	dan.carpenter@oracle.com, rusty@rustcorp.com.au,
	jbeulich@suse.com
Subject: [tip:x86/apic] x86: lguest: interrupt[] array size has changed
Date: Sun, 16 Nov 2014 10:18:31 -0800	[thread overview]
Message-ID: <tip-acfcdccea94ed09cc2c20afbc5dca5bc6a6d69c7@git.kernel.org> (raw)
In-Reply-To: <20141115185718.GB6530@mwanda>

Commit-ID:  acfcdccea94ed09cc2c20afbc5dca5bc6a6d69c7
Gitweb:     http://git.kernel.org/tip/acfcdccea94ed09cc2c20afbc5dca5bc6a6d69c7
Author:     Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Sat, 15 Nov 2014 21:57:18 +0300
Committer:  Thomas Gleixner <tglx@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.carpenter@oracle.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: lguest@lists.ozlabs.org
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/20141115185718.GB6530@mwanda
Signed-off-by: Thomas Gleixner <tglx@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)

  parent reply	other threads:[~2014-11-16 18:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03  8:39 [PATCH] x86: avoid building unused IRQ entry stubs Jan Beulich
2014-11-04 19:15 ` [tip:x86/apic] x86: Avoid " tip-bot for Jan Beulich
     [not found] ` <20141115185718.GB6530@mwanda>
2014-11-16 18:18   ` tip-bot for Dan Carpenter [this message]
2014-12-19 14:01   ` tip-bot for Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-acfcdccea94ed09cc2c20afbc5dca5bc6a6d69c7@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ak@linux.intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=hpa@zytor.com \
    --cc=jbeulich@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox