Centos-kernel-stream-9/drivers/scsi/pm8001
Igor Pylypiv d712d3fb48 scsi: pm80xx: Fix TMF task completion race condition
The TMF timeout timer may trigger at the same time when the response from a
controller is being handled. When this happens the SAS task may get freed
before the response processing is finished.

Fix this by calling complete() only when SAS_TASK_STATE_DONE is not set.

A similar race condition was fixed in commit b90cd6f2b9 ("scsi: libsas:
fix a race condition when smp task timeout")

Link: https://lore.kernel.org/r/20210707185945.35559-1-ipylypiv@google.com
Reviewed-by: Vishakha Channapattan <vishakhavc@google.com>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-07-28 23:29:09 -04:00
..
Makefile
pm80xx_hwi.c scsi: pm8001: Clean up kernel-doc and comments 2021-07-12 21:54:07 -04:00
pm80xx_hwi.h
pm8001_chips.h
pm8001_ctl.c scsi: pm8001: Clean up kernel-doc and comments 2021-07-12 21:54:07 -04:00
pm8001_ctl.h
pm8001_defs.h
pm8001_hwi.c scsi: pm8001: Clean up kernel-doc and comments 2021-07-12 21:54:07 -04:00
pm8001_hwi.h
pm8001_init.c scsi: pm8001: Clean up kernel-doc and comments 2021-07-12 21:54:07 -04:00
pm8001_sas.c scsi: pm80xx: Fix TMF task completion race condition 2021-07-28 23:29:09 -04:00
pm8001_sas.h