Skip to content

Commit

Permalink
[S390] show_interrupts: prevent cpu hotplug when walking cpu_online_map.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
heicarst authored and Martin Schwidefsky committed May 15, 2008
1 parent 85cb185 commit 8dd79cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/s390/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -43,7 +44,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n');

}

put_online_cpus();
return 0;
}

Expand Down

0 comments on commit 8dd79cb

Please sign in to comment.