linux/drivers/scsi/lpfc
James Smart af5f1402b5 scsi: lpfc: Re-fix use after free in lpfc_rq_buf_free()
commit e5785d3ec3 upstream.

Commit 9816ef6ecb ("scsi: lpfc: Use after free in lpfc_rq_buf_free()")
was made to correct a use after free condition in lpfc_rq_buf_free().
Unfortunately, a subsequent patch cut on a tree without the fix
inadvertently reverted the fix.

Put the fix back: Move the freeing of the rqb_entry to after the print
function that references it.

Link: https://lore.kernel.org/r/20201020202719.54726-4-james.smart@broadcom.com
Fixes: 411de511c6 ("scsi: lpfc: Fix RQ empty firmware trap")
Cc: <stable@vger.kernel.org> # v4.17+
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:26:15 +01:00
..
lpfc_attr.c scsi: lpfc: Fix kernel crash at lpfc_nvme_info_show during remote port bounce 2020-10-01 13:14:26 +02:00
lpfc_attr.h
lpfc_bsg.c scsi: lpfc: Fix memory leak on lpfc_bsg_write_ebuf_set func 2020-01-09 10:18:56 +01:00
lpfc_bsg.h
lpfc_compat.h
lpfc_crtn.h
lpfc_ct.c scsi: lpfc: Fix coverity errors in fmdi attribute handling 2020-10-01 13:14:33 +02:00
lpfc_debugfs.c
lpfc_debugfs.h
lpfc_disc.h
lpfc_els.c scsi: lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery 2020-09-23 12:10:57 +02:00
lpfc_hbadisc.c scsi: lpfc: Fix discovery failures when target device connectivity bounces 2020-01-04 19:12:35 +01:00
lpfc_hw.h scsi: lpfc: Fix coverity errors in fmdi attribute handling 2020-10-01 13:14:33 +02:00
lpfc_hw4.h
lpfc_ids.h
lpfc_init.c scsi: lpfc: Cap NPIV vports to 256 2019-12-17 20:35:28 +01:00
lpfc_logmsg.h
lpfc_mbox.c scsi: lpfc: Correct topology type reporting on G7 adapters 2019-12-17 20:35:30 +01:00
lpfc_mem.c scsi: lpfc: Re-fix use after free in lpfc_rq_buf_free() 2020-12-30 11:26:15 +01:00
lpfc_nl.h
lpfc_nportdisc.c scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices 2020-01-04 19:12:39 +01:00
lpfc_nvme.c scsi: lpfc: Fix crash in target side cable pulls hitting WAIT_FOR_UNREG 2020-04-29 16:31:10 +02:00
lpfc_nvme.h
lpfc_nvmet.c scsi: lpfc: nvmet: Avoid hang / use-after-free again when destroying targetport 2020-08-21 11:05:37 +02:00
lpfc_nvmet.h
lpfc_scsi.c scsi: lpfc: Fix dif and first burst use in write commands 2019-12-05 09:19:48 +01:00
lpfc_scsi.h
lpfc_sli.c scsi: lpfc: Fix invalid sleeping context in lpfc_sli4_nvmet_alloc() 2020-12-30 11:26:15 +01:00
lpfc_sli.h
lpfc_sli4.h scsi: lpfc: fcoe: Fix link down issue after 1000+ link bounces 2019-12-01 09:17:26 +01:00
lpfc_version.h
lpfc_vport.c scsi: lpfc: Fix shost refcount mismatch when deleting vport 2020-09-03 11:24:19 +02:00
lpfc_vport.h
lpfc.h scsi: lpfc: Cap NPIV vports to 256 2019-12-17 20:35:28 +01:00
Makefile