]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix oops when unloading driver while running mds diags
authorDick Kennedy <dick.kennedy@broadcom.com>
Mon, 3 Aug 2020 21:02:25 +0000 (14:02 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 5 Aug 2020 00:56:57 +0000 (20:56 -0400)
commitc558db47592a08641ed3f2063b82c580034c55a6
tree7a6580eff2d4e0aa62d2ce0999570acdadbdb3b7
parent47df91bd1104313a9d4ca2c13032730f271ce8e2
scsi: lpfc: Fix oops when unloading driver while running mds diags

While mds diagnostic tests are running, if the driver is requested to be
unloaded, oops or hangs are observed.  The driver doesn't terminate the
processing of diag frames when the unload is started. As such: oops may be
seen for __lpfc_sli_release_iocbq_s4 because ring memory is referenced that
was already freed; or hangs see in lpfc_nvme_wait_for_io_drain as ios no
longer complete.

If unloading, don't process diag frames. Just clean them up.

Link: https://lore.kernel.org/r/20200803210229.23063-5-jsmart2021@gmail.com
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_sli.c