[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj5BkjopJ6tGx=HV7LExZ9BNZhUrMN9T2r_Z63BooBbCetwDQ@mail.gmail.com>
Date: Wed, 16 Nov 2016 09:44:26 +0800
From: Zhangfei Gao <zhangfei.gao@...il.com>
To: John Garry <john.garry@...wei.com>
Cc: martin.petersen@...cle.com, jejb@...ux.vnet.ibm.com,
linux-scsi@...r.kernel.org, linuxarm@...wei.com,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
John Garry <john.garry2@...l.dcu.ie>
Subject: Re: [PATCH 10/11] hisi_sas: use atomic64_t for hisi_sas_device.running_req
On Mon, Nov 7, 2016 at 8:48 PM, John Garry <john.garry@...wei.com> wrote:
> Sometimes the value of hisi_sas_device.running_req
> would go negative unless we have the check for
> running_req >= 0 before trying to decrement.
>
> This is because using running_req is not thread-safe.
>
> As such, the value for running_req may be actually incorrect,
> so use atomic64_t instead.
>
> Signed-off-by: John Garry <john.garry@...wei.com>
> Reviewed-by: Xiang Chen <chenxiang66@...ilicon.com>
Reviewed-by: Zhangfei Gao <zhangfei.gao@...aro.org>
Powered by blists - more mailing lists