Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1662450 > unrolled thread

[PATCH v5 00/23] hisi_sas: hip08 support

Started byJohn Garry <john.garry@huawei.com>
First post2017-06-09 16:00 +0200
Last post2017-06-12 12:30 +0200
Articles 2 on this page of 22 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v5 00/23] hisi_sas: hip08 support John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 23/23] scsi: hisi_sas: modify internal abort dev flow for v3 hw John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 01/23] scsi: hisi_sas: fix timeout check in hisi_sas_internal_task_abort() John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 19/23] scsi: hisi_sas: add v3 code to send internal abort command John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 18/23] scsi: hisi_sas: add v3 code for itct setup and free John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 02/23] scsi: hisi_sas: define hisi_sas_device.device_id as int John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 20/23] scsi: hisi_sas: add get_wideport_bitmap_v3_hw() John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 08/23] scsi: hisi_sas: create hisi_sas_get_fw_info() John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 16/23] scsi: hisi_sas: add v3 code to send SMP frame John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 14/23] scsi: hisi_sas: add v3 cq interrupt handler John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 04/23] scsi: hisi_sas: relocate get_ata_protocol() John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 07/23] scsi: hisi_sas: add pci_dev in hisi_hba struct John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 15/23] scsi: hisi_sas: add v3 code to send SSP frame John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 09/23] scsi: hisi_sas: add skeleton v3 hw driver John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 17/23] scsi: hisi_sas: add v3 code to send ATA frame John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 11/23] scsi: hisi_sas: add v3 hw init John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 05/23] scsi: hisi_sas: relocate sata_done_v2_hw() John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
    [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock John Garry <john.garry@huawei.com> - 2017-06-09 16:00 +0200
      Re: [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of  hisi_hba.lock kbuild test robot <lkp@intel.com> - 2017-06-10 22:50 +0200
        Re: [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of  hisi_hba.lock John Garry <john.garry@huawei.com> - 2017-06-12 10:30 +0200
          Re: [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock Arnd Bergmann <arnd@arndb.de> - 2017-06-12 11:50 +0200
            Re: [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of  hisi_hba.lock John Garry <john.garry@huawei.com> - 2017-06-12 12:30 +0200

Page 2 of 2 — ← Prev page 1 [2]


#1663373 — Re: [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock

FromArnd Bergmann <arnd@arndb.de>
Date2017-06-12 11:50 +0200
SubjectRe: [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock
Message-ID<tRu8V-p0-5@gated-at.bofh.it>
In reply to#1663315
On Mon, Jun 12, 2017 at 10:26 AM, John Garry <john.garry@huawei.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

[toc] | [prev] | [next] | [standalone]


#1663406 — Re: [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock

FromJohn Garry <john.garry@huawei.com>
Date2017-06-12 12:30 +0200
SubjectRe: [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock
Message-ID<tRuLE-Ua-17@gated-at.bofh.it>
In reply to#1663373
On 12/06/2017 10:45, Arnd Bergmann wrote:
> On Mon, Jun 12, 2017 at 10:26 AM, John Garry <john.garry@huawei.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

Hi Arnd,

Ah, now I see. The error message mislead me, as I straight away checked 
hisi_sas_task_prep() which does the same locking and also reuses flags 
for spinlock_irqsave(), but it's safe here.

But, as you pointed out, the problem is in 
hisi_sas_internal_abort_task_exec().

A thought: it would be useful if coccinelle printed explicitly the 
function name which has the warning/error.

Thanks,
John

>
> .
>

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.kernel


csiph-web