Commit f8adfb1
scsi: lpfc: Fix illegal memory access on Abort IOCBs
[ Upstream commit e136471 ]
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>1 parent 0195e28 commit f8adfb1
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11590 | 11590 | | |
11591 | 11591 | | |
11592 | 11592 | | |
| 11593 | + | |
11593 | 11594 | | |
11594 | 11595 | | |
11595 | 11596 | | |
11596 | 11597 | | |
11597 | 11598 | | |
11598 | | - | |
11599 | | - | |
| 11599 | + | |
| 11600 | + | |
| 11601 | + | |
| 11602 | + | |
| 11603 | + | |
| 11604 | + | |
| 11605 | + | |
| 11606 | + | |
11600 | 11607 | | |
11601 | 11608 | | |
11602 | 11609 | | |
| |||
0 commit comments