login
Header Space

 
 

[S390] show_interrupts: prevent cpu hotplug when walking cpu_online_map.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Thursday, May 15, 2008 - 4:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8dd79c...
Commit:     8dd79cb1051723496bbdcea2247e49567cedb3ac
Parent:     85cb185dad54be308c3f3a6068dd7d418b8b53e4
Author:     Heiko Carstens <heiko.carstens@de.ibm.com>
AuthorDate: Thu May 15 16:52:39 2008 +0200
Committer:  Martin Schwidefsky <schwidefsky@de.ibm.com>
CommitDate: Thu May 15 16:52:41 2008 +0200

    [S390] show_interrupts: prevent cpu hotplug when walking cpu_online_map.
    
    Surround all the code withing show_interrupts() with
    get/put_online_cpus() to prevent strange results wrt cpu hotplug.
    
    Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
 arch/s390/kernel/irq.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index c59a86d..e7c5bfb 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -25,6 +25,7 @@ int show_interrupts(struct seq_file *p, void *v)
 	static const char *intrclass_names[] = { "EXT", "I/O", };
 	int i = *(loff_t *) v, j;
 
+	get_online_cpus();
 	if (i == 0) {
 		seq_puts(p, "           ");
 		for_each_online_cpu(j)
@@ -43,7 +44,7 @@ int show_interrupts(struct seq_file *p, void *v)
                 seq_putc(p, '\n');
 
         }
-
+	put_online_cpus();
         return 0;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[S390] show_interrupts: prevent cpu hotplug when walking cpu..., Linux Kernel Mailing List..., (Thu May 15, 4:59 pm)
speck-geostationary