From: Dick Kennedy Date: Sat, 30 Sep 2017 00:34:27 +0000 (-0700) Subject: scsi: lpfc: fix pci hot plug crash in timer management routines X-Git-Tag: v4.14.3~88 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=890d9fcd787e31d746070f6e4d5cdb674f8f1efc;p=platform%2Fkernel%2Flinux-exynos.git scsi: lpfc: fix pci hot plug crash in timer management routines commit 1901762f2ca2747ed269239ca5332a8023ce4e3d upstream. 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. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 100bc4c..101ff3d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -11420,6 +11420,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);