]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: hisi_sas: Free slot later in slot_complete_vx_hw()
authorXiang Chen <chenxiang66@hisilicon.com>
Mon, 24 Sep 2018 15:06:31 +0000 (23:06 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Oct 2018 04:27:04 +0000 (00:27 -0400)
commitbc7073ac451ae18871cb98a61b9a3244c5121789
tree5f773da4c5cbbe27eb28bd63d7f0f04bc0f6b0e2
parent408bae0159009236889f8c0808987de4435858cf
scsi: hisi_sas: Free slot later in slot_complete_vx_hw()

If an SSP/SMP IO times out, it may be actually in reality be
simultaneously processing completion of the slot in
slot_complete_vx_hw().

Then if the slot is freed in slot_complete_vx_hw() (this IPTT is freed
and it may be re-used by other slot), and we may abort the wrong slot in
hisi_sas_abort_task().

So to solve the issue, free the slot after the check of
SAS_TASK_STATE_ABORTED in slot_complete_vx_hw().

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c