Commit f9e416d3 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Overflow check for i386 assign_irq_vector

From: James Cleverdon <jamesclv@us.ibm.com>

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.
parent 9edad7f8
......@@ -1143,6 +1143,7 @@ int irq_vector[NR_IRQS] = { FIRST_DEVICE_VECTOR , 0 };
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment