public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Yong Zhang <yong.zhang0@gmail.com>
To: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: [PATCH 2/2] [S390] irq: fix show_interrupts() vs cpu hotplug
Date: Wed, 27 Jul 2011 12:56:23 +0800	[thread overview]
Message-ID: <1311742583-18633-2-git-send-email-yong.zhang0@gmail.com> (raw)
In-Reply-To: <1311742583-18633-1-git-send-email-yong.zhang0@gmail.com>

The current usage of get_online_cpus()/put_online_cpus()
in show_interrupts() is not correct since show_interrupts()
will be called nr_irqs times, during that period, cpu hotplug
could also happen.
Since have moved the protection to upper(patch#1), the pair of
get_online_cpus()/put_online_cpus() could be removed here.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/s390/kernel/irq.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index e3264f6..57c036d 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -63,7 +63,6 @@ int show_interrupts(struct seq_file *p, void *v)
 {
 	int i = *(loff_t *) v, j;
 
-	get_online_cpus();
 	if (i == 0) {
 		seq_puts(p, "           ");
 		for_each_online_cpu(j)
@@ -83,7 +82,6 @@ int show_interrupts(struct seq_file *p, void *v)
 			seq_printf(p, "  %s", intrclass_names[i].desc);
                 seq_putc(p, '\n');
         }
-	put_online_cpus();
         return 0;
 }
 
-- 
1.7.4.1

  reply	other threads:[~2011-07-27  4:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110726163424.GC2576@osiris.boeblingen.de.ibm.com>
2011-07-27  4:56 ` [PATCH 1/2] proc/insterrupts: make it cpu hotplug safe Yong Zhang
2011-07-27  4:56   ` Yong Zhang [this message]
2011-07-27  6:06     ` [PATCH 2/2] [S390] irq: fix show_interrupts() vs cpu hotplug Heiko Carstens
2011-07-27  5:20   ` [PATCH 1/2] proc/insterrupts: make it cpu hotplug safe KOSAKI Motohiro
2011-07-27  5:47     ` Yong Zhang
2011-07-27  5:55       ` KOSAKI Motohiro
2011-07-27  6:05   ` Heiko Carstens

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=1311742583-18633-2-git-send-email-yong.zhang0@gmail.com \
    --to=yong.zhang0@gmail.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /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