OSDN Git Service

scsi: lpfc: Fix resource leak in lpfc_sli4_send_seq_to_ulp()
authorJames Smart <jsmart2021@gmail.com>
Tue, 26 Apr 2022 18:14:19 +0000 (11:14 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 27 Apr 2022 02:24:28 +0000 (22:24 -0400)
commit646db1a560f44236b7278b822ca99a1d3b6ea72c
treebd37350f928ae4041a7ea525431e784fff1de2e3
parent3d1d34ec1fbcab2d77e3733ff385a074fdf2d60c
scsi: lpfc: Fix resource leak in lpfc_sli4_send_seq_to_ulp()

If no handler is found in lpfc_complete_unsol_iocb() to match the rctl of a
received frame, the frame is dropped and resources are leaked.

Fix by returning resources when discarding an unhandled frame type.  Update
lpfc_fc_frame_check() handling of NOP basic link service.

Link: https://lore.kernel.org/r/20220426181419.9154-1-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@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