]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: lpfc: Fix crash during driver unload with running nvme traffic
authorJames Smart <jsmart2021@gmail.com>
Tue, 21 Nov 2017 00:00:41 +0000 (16:00 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 16 Mar 2018 12:05:23 +0000 (07:05 -0500)
commit749edc3b89f9d5acb38c0297e2c41c38999dd709
tree2a9b28932ed2d1e915f2dc8a7ae366bfd22ef62b
parent1aee04abf5535327be462b7e90c3fc5c1fa44bd8
scsi: lpfc: Fix crash during driver unload with running nvme traffic

BugLink: http://bugs.launchpad.net/bugs/1752182
When the driver is unloading, the nvme transport could be in the process
of submitting new requests, will send abort requests to terminate
associations, or may make LS-related requests.  The driver's abort and
request entry points currently is ignorant of the unloading state and is
starting the requests even though the infrastructure to complete them
continues to teardown.

Change the entry points for new requests to check whether unloading and
if so, reject the requests. Abort routines check unloading, and if so,
noop the request. An abort is noop'd as the teardown paths are already
aborting/terminating the io outstanding at the time the teardown
initiated.

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 3386f4bdd243ad5a9094d390297602543abe9902)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/lpfc/lpfc_nvme.c
drivers/scsi/lpfc/lpfc_nvmet.c