mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 06:50:53 +07:00
scsi: hisi_sas: fix NULL check in SMP abort task path
This patch adds a NULL check of task->lldd_task before freeing the slot in SMP path. This is to guard against the scenario of the slot being freed during the from the preceding internal abort. Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
1eb8eeac17
commit
378c233bcb
@ -1161,7 +1161,7 @@ static int hisi_sas_abort_task(struct sas_task *task)
|
||||
|
||||
rc = hisi_sas_internal_task_abort(hisi_hba, device,
|
||||
HISI_SAS_INT_ABT_CMD, tag);
|
||||
if (rc == TMF_RESP_FUNC_FAILED) {
|
||||
if (rc == TMF_RESP_FUNC_FAILED && task->lldd_task) {
|
||||
spin_lock_irqsave(&hisi_hba->lock, flags);
|
||||
hisi_sas_do_release_task(hisi_hba, task, slot);
|
||||
spin_unlock_irqrestore(&hisi_hba->lock, flags);
|
||||
|
Loading…
Reference in New Issue
Block a user