[Patch] apha show_interrups() trashes argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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]>

--- linux-2.6.16-rc1-git4/arch/alpha/kernel/irq.c.orig	2006-01-25 21:19:14.000000000 +0100
+++ linux-2.6.16-rc1-git4/arch/alpha/kernel/irq.c	2006-01-25 21:20:12.000000000 +0100
@@ -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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux