be2iscsi : Fix kernel panic during reboot/shutdown
authorJohn Soni Jose <sony.john-n@emulex.com>
Fri, 26 Sep 2014 19:13:55 +0000 (15:13 -0400)
committerChristoph Hellwig <hch@lst.de>
Tue, 30 Sep 2014 07:29:55 +0000 (09:29 +0200)
 In the reboot/shutdown path, workqueue was destroyed after the
 adapter resource were freed. The task associated with workqueue
 was getting executed after resources were freed. This lead to
 kernel panic.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/be2iscsi/be_main.c

index db2bd4d5311a88fdfbbd86230f17b71457441065..30d74a06b9935c5ec760ce3f7f6788a7600d5a33 100644 (file)
@@ -5223,6 +5223,7 @@ static void beiscsi_quiesce(struct beiscsi_hba *phba,
                        free_irq(phba->pcidev->irq, phba);
                }
        pci_disable_msix(phba->pcidev);
+       cancel_delayed_work_sync(&phba->beiscsi_hw_check_task);
 
        for (i = 0; i < phba->num_cpus; i++) {
                pbe_eq = &phwi_context->be_eq[i];
@@ -5244,7 +5245,6 @@ static void beiscsi_quiesce(struct beiscsi_hba *phba,
                hwi_cleanup(phba);
        }
 
-       cancel_delayed_work_sync(&phba->beiscsi_hw_check_task);
 }
 
 static void beiscsi_remove(struct pci_dev *pcidev)