linux/drivers/scsi/lpfc
James Smart f8adfb1d37 scsi: lpfc: Fix illegal memory access on Abort IOCBs
[ Upstream commit e136471135 ]

In devloss timer handler and in backend calls to terminate remote port I/O,
there is logic to walk through all active IOCBs and validate them to
potentially trigger an abort request. This logic is causing illegal memory
accesses which leads to a crash. Abort IOCBs, which may be on the list, do
not have an associated lpfc_io_buf struct. The driver is trying to map an
lpfc_io_buf struct on the IOCB and which results in a bogus address thus
the issue.

Fix by skipping over ABORT IOCBs (CLOSE IOCBs are ABORTS that don't send
ABTS) in the IOCB scan logic.

Link: https://lore.kernel.org/r/20210421234433.102079-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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-22 11:40:53 +02:00
..
lpfc_attr.c scsi: lpfc: Fix error handling for mailboxes completed in MBX_POLL mode 2021-05-11 14:47:30 +02:00
lpfc_attr.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_bsg.c scsi: lpfc: Fix validation of bsg reply lengths 2020-08-04 20:56:57 -04:00
lpfc_bsg.h scsi: lpfc: Allow applications to issue Common Set Features mailbox command 2020-07-02 23:06:40 -04:00
lpfc_compat.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_crtn.h scsi: lpfc: Remove unsupported mbox PORT_CAPABILITIES logic 2021-05-11 14:47:31 +02:00
lpfc_ct.c SCSI misc on 20201013 2020-10-14 15:15:35 -07:00
lpfc_debugfs.c scsi: lpfc: Fix some error codes in debugfs 2021-03-25 09:04:09 +01:00
lpfc_debugfs.h scsi: lpfc: Make debugfs ktime stats generic for NVME and SCSI 2020-03-29 18:10:58 -04:00
lpfc_disc.h scsi: lpfc: Fix scheduling call while in softirq context in lpfc_unreg_rpi 2020-12-30 11:54:23 +01:00
lpfc_els.c SCSI fixes on 20200908 2020-09-08 11:42:58 -07:00
lpfc_hbadisc.c scsi: lpfc: Fix ancient double free 2021-03-04 11:38:01 +01:00
lpfc_hw.h scsi: lpfc: Remove prototype FIPS/DSS options from SLI-3 2020-03-29 18:10:58 -04:00
lpfc_hw4.h scsi: lpfc: Remove unsupported mbox PORT_CAPABILITIES logic 2021-05-11 14:47:31 +02:00
lpfc_ids.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_init.c scsi: lpfc: Remove unsupported mbox PORT_CAPABILITIES logic 2021-05-11 14:47:31 +02:00
lpfc_logmsg.h scsi: lpfc: Add an internal trace log buffer 2020-07-02 23:06:49 -04:00
lpfc_mbox.c scsi: lpfc: Remove unsupported mbox PORT_CAPABILITIES logic 2021-05-11 14:47:31 +02:00
lpfc_mem.c scsi: lpfc: Re-fix use after free in lpfc_rq_buf_free() 2020-12-30 11:54:23 +01:00
lpfc_nl.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_nportdisc.c scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response 2021-05-11 14:47:30 +02:00
lpfc_nvme.c scsi: lpfc: Fix EEH encountering oops with NVMe traffic 2021-02-17 11:02:22 +01:00
lpfc_nvme.h lpfc: nvmet: Add support for NVME LS request hosthandle 2020-05-09 16:18:34 -06:00
lpfc_nvmet.c scsi: lpfc: Fix incorrect dbde assignment when building target abts wqe 2021-05-11 14:47:23 +02:00
lpfc_scsi.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
lpfc_scsi.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_sli.c scsi: lpfc: Fix illegal memory access on Abort IOCBs 2021-05-22 11:40:53 +02:00
lpfc_sli.h scsi: lpfc: Make debugfs ktime stats generic for NVME and SCSI 2020-03-29 18:10:58 -04:00
lpfc_sli4.h scsi: lpfc: Fix scheduling call while in softirq context in lpfc_unreg_rpi 2020-12-30 11:54:23 +01:00
lpfc_version.h scsi: lpfc: Update lpfc version to 12.8.0.4 2020-08-31 21:51:28 -04:00
lpfc_vport.c scsi: lpfc: Add an internal trace log buffer 2020-07-02 23:06:49 -04:00
lpfc_vport.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc.h scsi: lpfc: Fix scheduling call while in softirq context in lpfc_unreg_rpi 2020-12-30 11:54:23 +01:00
Makefile scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00