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)
commit3e178f3ecfcf91a258e832b0f0843a4cfd9059ac
tree5f773da4c5cbbe27eb28bd63d7f0f04bc0f6b0e2
parent584f53fe5f529d877968c711a095923c1ed12307
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