aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/isl29020.c
diff options
context:
space:
mode:
authorXiang Chen <chenxiang66@hisilicon.com>2018-05-02 23:56:26 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-05-08 01:10:44 -0400
commitcd938e535e909b80948f26d284ba7475adee0c08 (patch)
tree72d86f31232095bf6953bf8978c7d3bf413b6939 /drivers/misc/isl29020.c
parentb81b6cce58b7912e0d35f0b5bf526cb798f8e7aa (diff)
scsi: hisi_sas: check host frozen before calling "done" function
When the host is frozen in SCSI EH state, at any point after the LLDD sets SAS_TASK_STATE_DONE for the sas_task task state, libsas may free the task; see sas_scsi_find_task(). This puts the LLDD in a difficult position, in that once it sets SAS_TASK_STATE_DONE for the task state it should not reference the sas_task again. But the LLDD needs will check the sas_task indirectly in calling task->task_done()->sas_scsi_task_done() or sas_ata_task_done() (to check if the host is frozen state actually). And the LLDD cannot set SAS_TASK_STATE_DONE for the task state after task->task_done() is called (as the sas_task is free'd at this point). This situation would seem to be a problem made by libsas. To work around, check in the LLDD whether the host is in frozen state to ensure it is ok to call task->task_done() function. If in the frozen state, we rely on SCSI EH and libsas to free the sas_task directly. We do not do this for the following IO types: - SMP - they are managed in libsas directly, outside SCSI EH - Any internally originated IO, for similar reason 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>
Diffstat (limited to 'drivers/misc/isl29020.c')
0 files changed, 0 insertions, 0 deletions