]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix crash after handling a pci error
authorJames Smart <jsmart2021@gmail.com>
Sun, 22 Mar 2020 18:12:57 +0000 (11:12 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 27 Mar 2020 03:15:09 +0000 (23:15 -0400)
commitb6d777585593426b62a560be0f6d0bc0b20a0731
tree2b7007074b5acc17913f079e5e99bacbe328e722
parent7214337d3882fb4c124cf10b8bfec8bab94c594d
scsi: lpfc: Fix crash after handling a pci error

Injecting EEH on a 32GB card is causing kernel oops

The pci error handler is doing an IO flush and the offline code is also
doing an IO flush. When the 1st flush is complete the hdwq is destroyed
(freed), yet the second flush accesses the hdwq and crashes.

Added a check in lpfc_sli4_fush_io_rings to check both the HBA_IOQ_FLUSH
flag and the hdwq pointer to see if it is already set and not already
freed.

Link: https://lore.kernel.org/r/20200322181304.37655-6-jsmart2021@gmail.com
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c