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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <844f24da-63a8-b949-2c0d-5c15159b25e0@suse.de>
Date:   Fri, 15 Dec 2017 13:14:08 +0100
From:   Hannes Reinecke <hare@...e.de>
To:     Jason Yan <yanaijie@...wei.com>, martin.petersen@...cle.com,
        jejb@...ux.vnet.ibm.com
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        john.garry@...wei.com, zhaohongjiang@...wei.com, hare@...e.com,
        dan.j.williams@...el.com, jthumshirn@...e.de,
        Raj.Dinesh@...rosemi.com, hch@....de, huangdaode@...ilicon.com,
        chenxiang66@...ilicon.com, xiyou.wangcong@...il.com,
        Yijing Wang <wangyijing@...wei.com>,
        Ewan Milne <emilne@...hat.com>, Tomas Henzl <thenzl@...hat.com>
Subject: Re: [PATCH v5 1/7] scsi: libsas: Use dynamic alloced work to avoid
 sas event lost

On 12/08/2017 10:42 AM, Jason Yan wrote:
> Now libsas hotplug work is static, every sas event type has its own
> static work, LLDD driver queues the hotplug work into shost->work_q.
> If LLDD driver burst posts lots hotplug events to libsas, the hotplug
> events may pending in the workqueue like
> 
> shost->work_q
> new work[PORTE_BYTES_DMAED] --> |[PHYE_LOSS_OF_SIGNAL][PORTE_BYTES_DMAED] -> processing
>                                 |<-------wait worker to process-------->|
> 
> In this case, a new PORTE_BYTES_DMAED event coming, libsas try to queue
> it to shost->work_q, but this work is already pending, so it would be
> lost. Finally, libsas delete the related sas port and sas devices, but
> LLDD driver expect libsas add the sas port and devices(last sas event).
> 
> This patch use dynamic allocated work to avoid this issue.
> 
> Signed-off-by: Yijing Wang <wangyijing@...wei.com>
> CC: John Garry <john.garry@...wei.com>
> CC: Johannes Thumshirn <jthumshirn@...e.de>
> CC: Ewan Milne <emilne@...hat.com>
> CC: Christoph Hellwig <hch@....de>
> CC: Tomas Henzl <thenzl@...hat.com>
> CC: Dan Williams <dan.j.williams@...el.com>
> Signed-off-by: Jason Yan <yanaijie@...wei.com>
> ---
>  drivers/scsi/libsas/sas_event.c    | 74 +++++++++++++++++++++++++++++---------
>  drivers/scsi/libsas/sas_init.c     | 27 ++++++++++++--
>  drivers/scsi/libsas/sas_internal.h |  6 ++++
>  drivers/scsi/libsas/sas_phy.c      | 44 +++++------------------
>  drivers/scsi/libsas/sas_port.c     | 18 +++++-----
>  include/scsi/libsas.h              | 17 +++++----
>  6 files changed, 115 insertions(+), 71 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@...e.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@...e.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ