* [patch -next] x86/lguest: interrupt[] array size has changed
@ 2014-11-15 18:57 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-11-15 18:57 UTC (permalink / raw)
To: kernel-janitors
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>
---
I can't actually compile this code, and I'm an lguest newbie. Please
review this one carefully.
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)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-15 18:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-15 18:57 [patch -next] x86/lguest: interrupt[] array size has changed Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).