scsi: hisi_sas: lock sensitive regions when servicing CQ interrupt
There is a bug in the current driver in that certain hisi_hba and port structure elements which we access when servicing the CQ interrupt do not use thread-safe accesses; these include hisi_sas_port linked-list of active slots (hisi_sas_port.entry), bitmap of currently allocated IPTT (in hisi_hba.slot_index_tags), and completion queue read pointer. As a solution, lock these elements with the hisi_hba.lock. Signed-off-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NXiang Chen <chenxiang66@hisilicon.com> Reviewed-by: NZhangfei Gao <zhangfei.gao@linaro.org> Tested-by: NHanjun Guo <hanjun.guo@linaro.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Showing
想要评论请 注册 或 登录