mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Cleverdon <jamesclv@us.ibm.com>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] Overflow check for i386 assign_irq_vector, 2.6.0-test5
Date: Thu, 11 Sep 2003 21:07:55 -0700	[thread overview]
Message-ID: <200309112107.55790.jamesclv@us.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

Some very large systems overflow the array and corrupt memory.  A BUG_ON will 
at least flag the problem until dynamic irq_vector allocation is added.


-- 
James Cleverdon
IBM xSeries Linux Solutions
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot comm

[-- Attachment #2: x445_assign_irq_vector_bug_on_2003-09-11_2.6.0-test5 --]
[-- Type: text/x-diff, Size: 498 bytes --]

diff -pru 2.6.0-test5/arch/i386/kernel/io_apic.c t5/arch/i386/kernel/io_apic.c
--- 2.6.0-test5/arch/i386/kernel/io_apic.c	2003-09-08 12:50:01.000000000 -0700
+++ t5/arch/i386/kernel/io_apic.c	2003-09-11 12:08:14.000000000 -0700
@@ -1143,6 +1143,7 @@ int irq_vector[NR_IRQS] = { FIRST_DEVICE
 static int __init assign_irq_vector(int irq)
 {
 	static int current_vector = FIRST_DEVICE_VECTOR, offset = 0;
+	BUG_ON(irq >= NR_IRQS);
 	if (IO_APIC_VECTOR(irq) > 0)
 		return IO_APIC_VECTOR(irq);
 next:

                 reply	other threads:[~2003-09-12  4:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200309112107.55790.jamesclv@us.ibm.com \
    --to=jamesclv@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®