apha show_interrups() trashes argument
PATCH 1/1 apha show_interrups() trashes argument
hi,
this is a bug found by cpminer. The show_interrupts function reuses i as a for loop counter, and therefore trashes its contents, which are needed later.
Signed-off-by Eric Sesterhenn <[email protected]>
arch/alpha/kernel/irq.c renamed from arch/alpha/kernel/irq.c.orig +3 -3
@@ -75,9 +75,9 @@ show_interrupts(struct seq_file *p, void#ifdef CONFIG_SMP if (i ==0 ) {seq_puts (p," " ); -for (i =0 ; i <NR_CPUS ; i++) -if (cpu_online (i)) -seq_printf (p,"CPU%d " , i); +for (j =0 ; j <NR_CPUS ; j++) +if (cpu_online (j)) +seq_printf (p,"CPU%d " , j);seq_putc (p,'\n' ); }#endif