From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967174AbdADBUN (ORCPT ); Tue, 3 Jan 2017 20:20:13 -0500 Received: from mail-pg0-f49.google.com ([74.125.83.49]:36582 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965582AbdADBUD (ORCPT ); Tue, 3 Jan 2017 20:20:03 -0500 Subject: Re: [PATCH 2/3] scsi: hisi_sas: lock sensitive regions when servicing CQ interrupt To: John Garry , jejb@linux.vnet.ibm.com, martin.petersen@oracle.com References: <1483446290-185084-1-git-send-email-john.garry@huawei.com> <1483446290-185084-3-git-send-email-john.garry@huawei.com> Cc: linuxarm@huawei.com, xuwei5@hisilicon.com, john.garry2@mail.dcu.ie, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, hanjun.guo@linaro.org From: zhangfei Message-ID: <5e36ec8b-fc52-3f9c-4a34-9b3c8c2efa6e@linaro.org> Date: Wed, 4 Jan 2017 09:19:51 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1483446290-185084-3-git-send-email-john.garry@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Reviewed-by: Xiang Chen Reviewed-by: Zhangfei Gao