From c0048de29d207fe3407360c28a9025891506dd6a Mon Sep 17 00:00:00 2001 From: Hendrik Brueckner Date: Wed, 6 Feb 2013 16:12:03 +0100 Subject: 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 Signed-off-by: Martin Schwidefsky --- net/iucv/iucv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net/iucv') diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index df082508362..4fe76ff214c 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -831,8 +831,11 @@ static int iucv_reboot_event(struct notifier_block *this, { int i; + if (cpumask_empty(&iucv_irq_cpumask)) + return NOTIFY_DONE; + get_online_cpus(); - on_each_cpu(iucv_block_cpu, NULL, 1); + on_each_cpu_mask(&iucv_irq_cpumask, iucv_block_cpu, NULL, 1); preempt_disable(); for (i = 0; i < iucv_max_pathid; i++) { if (iucv_path_table[i]) -- cgit v1.2.3