[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1jpah1ERvg2_ESmHizvJH9veTHTXU1cADt0wyfB80bsw@mail.gmail.com>
Date: Mon, 12 Jun 2017 11:45:49 +0200
From: Arnd Bergmann <arnd@...db.de>
To: John Garry <john.garry@...wei.com>
Cc: kbuild test robot <lkp@...el.com>, kbuild-all@...org,
"Martin K. Petersen" <martin.petersen@...cle.com>,
"James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
linuxarm@...wei.com, linux-scsi@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Christoph Hellwig <hch@...radead.org>,
Xiang Chen <chenxiang66@...ilicon.com>
Subject: Re: [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock
On Mon, Jun 12, 2017 at 10:26 AM, John Garry <john.garry@...wei.com> wrote:
> On 10/06/2017 21:44, kbuild test robot wrote:
>
>
> I don't think that reusing flags variable is in error, as there would be no
> nested spinlock at this point within the function.
>
> If it is not recommended or not permitted to reuse flags variable for
> separate spinlocks, then that can be changed - I don't know.
No, look again: coccinelle is right as the locks are nested in
https://github.com/0day-ci/linux/blob/bf95e9cccde4af4ed2012a6ec44d48b545d5ffed/drivers/scsi/hisi_sas/hisi_sas_main.c#L1208
dq->lock is already held and you acquire task->task_state_lock in
line 1208, which overwrites the flags.
Arnd
Powered by blists - more mailing lists