Re: [PATCH 2/3] scsi: hisi_sas: lock sensitive regions when servicing CQ interrupt

From: zhangfei
Date: Tue Jan 03 2017 - 20:20:16 EST




On 2017å01æ03æ 20:24, John Garry wrote:
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: John Garry <john.garry@xxxxxxxxxx>
Reviewed-by: Xiang Chen <chenxiang66@xxxxxxxxxxxxx>
Reviewed-by: Zhangfei Gao <zhangfei.gao@xxxxxxxxxx>