James Smart 13bc6bda6a scsi: lpfc: Fix illegal memory access on Abort IOCBs
[ Upstream commit e1364711359f3ced054bda9920477c8bf93b74c5 ]

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:38:29 +02:00
..
2020-12-30 11:50:53 +01:00
2021-01-06 14:48:38 +01:00
2021-05-14 09:44:25 +02:00
2021-05-11 14:04:12 +02:00
2019-07-11 15:14:01 -07:00
2019-07-11 15:17:41 -07:00
2021-05-11 14:04:10 +02:00
2019-03-02 11:39:54 -08:00
2019-07-11 15:17:41 -07:00
2019-07-11 15:17:41 -07:00
2018-12-18 23:19:21 -05:00
2019-07-11 15:17:41 -07:00
2019-01-08 21:58:35 -05:00
2019-01-08 21:58:35 -05:00
2019-07-20 10:04:58 -07:00
2019-07-11 15:14:01 -07:00
2019-06-18 19:46:18 -04:00
2019-07-11 15:17:41 -07:00
2018-12-18 23:19:21 -05:00
2018-11-06 21:31:28 -05:00
2021-05-14 09:44:25 +02:00
2019-07-11 15:14:01 -07:00
2018-12-28 14:48:06 -08:00
2019-08-16 11:33:56 -07:00
2019-08-16 11:33:56 -07:00
2019-07-11 15:14:01 -07:00
2019-07-11 15:14:01 -07:00
2019-11-05 23:17:53 -05:00
2019-08-04 21:41:29 -06:00
2019-07-11 15:14:01 -07:00
2018-12-18 23:19:21 -05:00
2021-05-14 09:44:25 +02:00
2021-05-14 09:44:25 +02:00
2019-07-11 15:17:41 -07:00
2019-07-11 15:14:01 -07:00