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] [thread-next>] [day] [month] [year] [list]
Message-ID: <70f96f2d-e47f-a187-36ca-68127290897b@suse.de>
Date:   Wed, 14 Jun 2017 15:05:10 +0200
From:   Johannes Thumshirn <jthumshirn@...e.de>
To:     John Garry <john.garry@...wei.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>
Cc:     Hannes Reinecke <hare@...e.de>,
        Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
        Linux SCSI Mailinglist <linux-scsi@...r.kernel.org>,
        wangyijing@...wei.com, Linuxarm <linuxarm@...wei.com>
Subject: Re: [PATCH] scsi: sas: scsi_queue_work can fail, so make callers
 aware

On 06/14/2017 02:57 PM, John Garry wrote:
> On 14/06/2017 12:52, Johannes Thumshirn wrote:
>> libsas uses scsi_queue_work() to queue it's internal event
>> notifications. scsi_queue_work() can return -EINVAL if the work queue
>> doesn't exist and it does call queue_work() which can return false if
>> the work is already queued.
>>
> 
> Hi Johannes,
> 
> When the queuing fails and we an report error, what is the caller, i.e.
> the LLDD, supposed to do with this information?
> 
> I mean, the LLDD is just reporting an event, like a broadcast event, and
> libsas could not handle it for some reason. The LLDD probably does not
> know how to handle this, apart from printing an error or maybe even
> disabling the originating PHY.

This depends on the event and the LLDD I guess. If it's -EINVAL (a.k.a
SCSI work queue not present) there's not much an LLDD can do about. If
it's a plain false, we could for instance report that we re-queue an
event or something similar.

>> Make the SAS event code capable of returning errors up to the caller,
>> which is handy when changing to dynamically allocated work in libsas
>> as well, as discussed here: https://lkml.org/lkml/2017/6/14/121.
> 
> I will comment on this patchset separately.

It's merrily a preparation patch for this libsas patchset and IFF we
want to merge it that way.

Should've made it clear in the log, sorry.

-- 
Johannes Thumshirn                                          Storage
jthumshirn@...e.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ