linux/drivers/scsi/hisi_sas
John Garry 6c6ac8b777 scsi: hisi_sas: Fix memory ordering in hisi_sas_task_deliver()
The memories for the slot should be observed to be written prior to
observing the slot as ready.

Prior to commit 26fc0ea74f ("scsi: libsas: Drop SAS_TASK_AT_INITIATOR"),
we had a spin_lock() + spin_unlock() immediately before marking the slot as
ready. The spin_unlock() - with release semantics - caused the slot memory
to be observed to be written.

Now that the spin_lock() + spin_unlock() is gone, use a smp_wmb().

Link: https://lore.kernel.org/r/1652774661-12935-1-git-send-email-john.garry@huawei.com
Fixes: 26fc0ea74f ("scsi: libsas: Drop SAS_TASK_AT_INITIATOR")
Reported-by: Yihang Li <liyihang6@hisilicon.com>
Tested-by: Yihang Li <liyihang6@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-05-19 20:16:26 -04:00
..
hisi_sas_main.c scsi: hisi_sas: Fix memory ordering in hisi_sas_task_deliver() 2022-05-19 20:16:26 -04:00
hisi_sas_v1_hw.c scsi: hisi_sas: Remove unnecessary print function dev_err() 2022-02-22 21:11:08 -05:00
hisi_sas_v2_hw.c scsi: hisi_sas: Use libsas internal abort support 2022-03-14 23:33:24 -04:00
hisi_sas_v3_hw.c scsi: hisi_sas: Undo RPM resume for failed notify phy event for v3 HW 2022-05-10 21:47:55 -04:00
hisi_sas.h scsi: hisi_sas: Use libsas internal abort support 2022-03-14 23:33:24 -04:00
Kconfig scsi: hisi_sas: Enable debugfs support by default 2021-01-26 23:02:11 -05:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00