]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix leak of ELS completions on adapter reset
authorJames Smart <jsmart2021@gmail.com>
Wed, 14 Aug 2019 23:56:36 +0000 (16:56 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Aug 2019 02:41:08 +0000 (22:41 -0400)
commit99c3f08e89fb5d4aedc7a9c5a7f2e92f1e2a5ad1
tree024ead3efced930012efb503df8f2a1d5e478342
parenteceadac5f22eab37d68cab51d97158a51d1d8a8d
scsi: lpfc: Fix leak of ELS completions on adapter reset

If the adapter is reset while there are outstanding ELS's, subsequent
reinitialization of the adapter will fail as it has not recovered all of
the io contexts relative to the ELS's.

If an ELS timed out or otherwise failed and an the ELS was attempted to be
aborted (which changes the ELS completion context), in causes where the
driver generates completions for the outstanding IO as the adapter would
not due to being reset, the driver released only the ELS context and failed
to release the abort context.  When the adapter went to reinit, as it had
not received all of the contexts, it failed to reinit.

Fix by having the ELS completion handler identify the driver-generated
completion status and release the abort context.

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