All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] apha show_interrups() trashes argument
@ 2006-01-25 20:22 Eric Sesterhenn / snakebyte
  0 siblings, 0 replies; only message in thread
From: Eric Sesterhenn / snakebyte @ 2006-01-25 20:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: rth

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 <snakebyte@gmx.de>

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-25 20:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-25 20:22 [Patch] apha show_interrups() trashes argument Eric Sesterhenn / snakebyte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.