Commit 6bdb228c authored by Qi Liu's avatar Qi Liu Committed by Zheng Zengkai
Browse files

scsi: hisi_sas: Fix phyup timeout on FPGA

mainline inclusion
from mainline-v5.17-rc1
commit 37310bad
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5WRGD
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=37310bad7fa6

----------------------------------------------------------------------

The OOB interrupt and phyup interrupt handlers may run out-of-order in high
CPU usage scenarios. Since the hisi_sas_phy.timer is added in
hisi_sas_phy_oob_ready() and disarmed in phy_up_v3_hw(), this out-of-order
execution will cause hisi_sas_phy.timer timeout to trigger.

To solve, protect hisi_sas_phy.timer and .attached with a lock, and ensure
that the timer won't be added after phyup handler completes.

Link: https://lore.kernel.org/r/1639579061-179473-8-git-send-email-john.garry@huawei.com


Signed-off-by: default avatarQi Liu <liuqi115@huawei.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarxiabing <xiabing12@h-partners.com>
Reviewed-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent dd2f3eb9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment