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.1.12-124.31.3~1002 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=544d0f7a09c7b7c73d93b34940fd37f30339200e;p=users%2Fjedix%2Flinux-maple.git scsi: lpfc: fix pci hot plug crash in timer management routines 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: # 4.12+ Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen (cherry picked from commit 1901762f2ca2747ed269239ca5332a8023ce4e3d) Signed-off-by: Dick dkennedy Signed-off-by: Dan Duval Reviewed-by: Jack Vogel --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 4b8c1bf05e59..fb3b7d5112fd 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -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);