scsi: lpfc: Fix panic if driver unloaded when port is offline
authorJames Smart <jsmart2021@gmail.com>
Tue, 26 Jun 2018 15:24:24 +0000 (08:24 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 11 Jul 2018 02:15:08 +0000 (22:15 -0400)
commitd580c6137476ab307a66e278cf7dbc666230f714
tree33a50da972c8fe4878c26172154a74518fe20f85
parent5cc167ddb7441013e2b5a5f47bf11af0264bb3e8
scsi: lpfc: Fix panic if driver unloaded when port is offline

System crashes when the lpfc module is unloaded after making the port
offline

The nvme queue pointers were freed during port offline, but were later
accessed in pci remove path.

Validate the pointers in pci remove path before accessing them.

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