mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Sesterhenn / snakebyte <snakebyte@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: rth@twiddle.net
Subject: [Patch] apha show_interrups() trashes argument
Date: Wed, 25 Jan 2006 21:22:50 +0100	[thread overview]
Message-ID: <1138220570.5767.6.camel@alice> (raw)

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



                 reply	other threads:[~2006-01-25 20:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1138220570.5767.6.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®