]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/scsi/lpfc/lpfc_init.c
scsi: lpfc: Fix driver handling of nvme resources during unload
authorJames Smart <jsmart2021@gmail.com>
Tue, 21 Nov 2017 00:00:42 +0000 (16:00 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 16 Mar 2018 12:05:23 +0000 (07:05 -0500)
commitd36f01705f030be0b127105524b37a4d1eaae333
treeae2be08d7dfd34590522dc45f2e2aea60597db71
parent749edc3b89f9d5acb38c0297e2c41c38999dd709
scsi: lpfc: Fix driver handling of nvme resources during unload

BugLink: http://bugs.launchpad.net/bugs/1752182
During driver unload, the driver may crash due to NULL pointers.  The
NULL pointers were due to the driver not protecting itself sufficiently
during some of the teardown paths.  Additionally, the driver was not
waiting for and cleanup up nvme io resources. As such, the driver wasn't
making the callbacks to the transport, stalling the transports
association teardown.

This patch waits for io clean up before tearding down and adds checks
for possible NULL pointers.

Cc: <stable@vger.kernel.org> # 4.12+
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>
(cherry picked from commit c3725bdcdf28f5e2f3a78b69e9dd010f49284a09)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/lpfc/lpfc_crtn.h
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_nvme.c