Overflow check for i386 assign_irq_vector, 2.6.0-test5
PATCH 1/1 Overflow check for i386 assign_irq_vector, 2.6.0-test5
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.
Signature · 3 lines
James Cleverdon
IBM xSeries Linux Solutions
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot commarch/i386/kernel/io_apic.c +1 -0
@@ -1143,6 +1143,7 @@ int irq_vector[NR_IRQS] = { FIRST_DEVICEstatic 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: