Skip to content

Commit

Permalink
iucv: fix kernel panic at reboot
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hendrik Brueckner authored and Martin Schwidefsky committed Feb 14, 2013
1 parent 0e0d04a commit c0048de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/iucv/iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit c0048de

Please sign in to comment.