aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>2013-02-06 10:12:03 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-02-14 09:55:19 -0500
commitc0048de29d207fe3407360c28a9025891506dd6a (patch)
treeaa6684b2e790103c7f26654ed638b91d31b4aace /net
parent0e0d04a8677f33360cfbb5f8c7aa4ee8cbf5a287 (diff)
iucv: fix kernel panic at reboot
The iucv base layer is initialized during the registration of the first iucv handler. If no handler is registered and the iucv_reboot_event() notifier is called, a missing check can cause a kernel panic in iucv_block_cpu(). To solve this issue, check the IRQ masks invoke iucv_block_cpu() for enabled CPUs only. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'net')
-rw-r--r--net/iucv/iucv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index df082508362d..4fe76ff214c2 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -831,8 +831,11 @@ static int iucv_reboot_event(struct notifier_block *this,
831{ 831{
832 int i; 832 int i;
833 833
834 if (cpumask_empty(&iucv_irq_cpumask))
835 return NOTIFY_DONE;
836
834 get_online_cpus(); 837 get_online_cpus();
835 on_each_cpu(iucv_block_cpu, NULL, 1); 838 on_each_cpu_mask(&iucv_irq_cpumask, iucv_block_cpu, NULL, 1);
836 preempt_disable(); 839 preempt_disable();
837 for (i = 0; i < iucv_max_pathid; i++) { 840 for (i = 0; i < iucv_max_pathid; i++) {
838 if (iucv_path_table[i]) 841 if (iucv_path_table[i])