scsi: lpfc: Fix SCSI io host reset causing kernel crash
authorJames Smart <jsmart2021@gmail.com>
Tue, 30 Jan 2018 23:58:57 +0000 (15:58 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 12 Feb 2018 16:43:23 +0000 (11:43 -0500)
commitc1dd9111b7f78a90bccd2e4abb9b9bb6319a4c64
tree021cdcd43b8b4b7a60c5cb836b14735e8c03f7cc
parenta5ff06817eb86d022bc11993850a42732d7e6979
scsi: lpfc: Fix SCSI io host reset causing kernel crash

During SCSI error handling escalation to host reset, the SCSI io
routines were moved off the txcmplq, but the individual io's ON_CMPLQ
flag wasn't cleared.  Thus, a background thread saw the io and attempted
to access it as if on the txcmplq.

Clear the flag upon removal.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c