lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 23 Nov 2016 09:07:32 +0800
From:   wangyijing <wangyijing@...wei.com>
To:     John Garry <john.garry@...wei.com>,
        Dan Williams <dan.j.williams@...el.com>
CC:     <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi <linux-scsi@...r.kernel.org>,
        "John Garry" <john.garry2@...l.dcu.ie>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        <linuxarm@...wei.com>, <lindar_liu@...sh.com>,
        Tejun Heo <tj@...nel.org>,
        Jinpu Wang <jinpu.wang@...fitbricks.com>
Subject: Re: [RFC PATCH] scsi: libsas: fix WARN on device removal

>>
>> The events are not lost.
> 
> In sas_queue_event(), if there is a particular event pending for a port/PHY, we cannot queue further same event types for that port/PHY. I think my colleagues found issue where we try to enqueue multiple complementary events.

Yes, we found this issue in our local tests.

> 
>> The new problem this patch introduces is
>> delaying sas port deletion where it was previously immediate.  So now
>> we can get into a situation where the port has gone down and can start
>> processing a port up event before the previous deletion work has run.
>>
>>>>
>>>>> And it's a very noisy warning, as in 6K lines on the console when an
>>>>> expander is unplugged.
>>>>
>>>>
>>>> Does something like this modulate the failure?
>>
>> I'm curious if we simply need to fix the double deletion of the
>> sas_port bsg queue, could you try the changes below?
>>
> 
> No, I just tested it on a root port and we get the same WARN.
> 
>>>>
>>>> diff --git a/drivers/scsi/scsi_transport_sas.c
>>>> b/drivers/scsi/scsi_transport_sas.c            index
>>>> 60b651bfaa01..11401e5c88ba 100644
>>>>                  --- a/drivers/scsi/scsi_transport_sas.c
>>>> +++ b/drivers/scsi/scsi_transport_sas.c
>>>> @@ -262,9 +262,10 @@ static void sas_bsg_remove(struct Scsi_Host
>>>> *shost, struct sas_rphy *rphy
>>>>  {
>>>>         struct request_queue *q;
>>>>
>>>> -       if (rphy)
>>>> +       if (rphy) {
>>>>                 q = rphy->q;
>>>> -       else
>>>> +               rphy->q = NULL;
>>>> +       } else
>>>>                 q = to_sas_host_attrs(shost)->q;
>>>>
>>>>         if (!q)
>>>>
>>>> .
>>>>
>>>
>>>
>>
>> .
>>
> 
> 
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ