]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix driver crash in target reset handler
authorJames Smart <jsmart2021@gmail.com>
Tue, 12 Mar 2019 23:30:17 +0000 (16:30 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Mar 2019 17:15:08 +0000 (13:15 -0400)
commitb06dc13b69af19fc571d7f32626be88ea5e21a18
tree8ed8d76132088ad0a7b6050608cbce8c2e86911b
parentfe31795ef859b8d63d1b9e63fad9f720483159a6
scsi: lpfc: Fix driver crash in target reset handler

It's possible for the scsi error handler to fire and call the target reset
handler simultaneously to the driver logging out and relogging into the
system.  If hit just right, the re-login may not have fully re-established
the remote port and the rdata->pnod structure may be null.

Check for NULL in the reset handler and return failure if NULL.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_scsi.c