linux_dsm_epyc7002/drivers/scsi/hisi_sas
Xiang Chen b81b6cce58 scsi: hisi_sas: Add some checks to avoid free'ing a sas_task twice
If the SCSI host enters EH, any pending IO will be processed by SCSI
EH. However it is possible that SCSI EH will try to abort the IO and
also at the same time the IO completes in the driver. In this situation
there is a small chance of freeing the sas_task twice.

Then if another IO re-uses freed sas_task before the second time of
free'ing sas_task, it is possible to free incorrect sas_task.

To avoid this situation, add some checks to increase reliability.  The
sas_task task state flag SAS_TASK_STATE_ABORTED is used to mutually
protect the LLDD and libsas freeing the task.

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>
2018-05-08 01:10:43 -04:00
..
hisi_sas_main.c scsi: hisi_sas: Add some checks to avoid free'ing a sas_task twice 2018-05-08 01:10:43 -04:00
hisi_sas_v1_hw.c scsi: hisi_sas: Code cleanup and minor bug fixes 2018-03-12 21:55:25 -04:00
hisi_sas_v2_hw.c scsi: hisi_sas: Add some checks to avoid free'ing a sas_task twice 2018-05-08 01:10:43 -04:00
hisi_sas_v3_hw.c scsi: hisi_sas: Add some checks to avoid free'ing a sas_task twice 2018-05-08 01:10:43 -04:00
hisi_sas.h scsi: hisi_sas: remove some unneeded structure members 2018-04-18 19:32:51 -04:00
Kconfig scsi: hisi_sas: Remove depends on HAS_DMA in case of platform dependency 2018-03-21 18:34:21 -04:00
Makefile scsi: hisi_sas: add skeleton v3 hw driver 2017-06-19 21:31:25 -04:00