]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: lpfc: fix pci hot plug crash in timer management routines
authorDick Kennedy <dick.kennedy@broadcom.com>
Sat, 30 Sep 2017 00:34:27 +0000 (17:34 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 8 Mar 2018 04:26:55 +0000 (20:26 -0800)
Orabug: 27631736

During pci hot plug, the kernel crashes in timer management code.

The sli4 remove_one handler is not stoping the timers as it starts to
remove the port so that it can be swapped.

Fix: Stop the timers early in the handler routine.

Note: Fix in SLI-4 only. SLI-3 already stopped the timers properly.

Cc: <stable@vger.kernel.org> # 4.12+
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 1901762f2ca2747ed269239ca5332a8023ce4e3d)
Signed-off-by: Dick dkennedy <dick.kennedy@broadcom.com>
Signed-off-by: Dan Duval <dan.duval@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/scsi/lpfc/lpfc_init.c

index 4b8c1bf05e59915c2f2be39f53ab6ee884c20fe4..fb3b7d5112fd082215a3a9ab83d5645717c9fe2f 100644 (file)
@@ -10765,6 +10765,7 @@ lpfc_pci_remove_one_s4(struct pci_dev *pdev)
        lpfc_debugfs_terminate(vport);
        lpfc_sli4_hba_unset(phba);
 
+       lpfc_stop_hba_timers(phba);
        spin_lock_irq(&phba->hbalock);
        list_del_init(&vport->listentry);
        spin_unlock_irq(&phba->hbalock);