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: <20180326125638.2510d7dd@pentland.suse.de>
Date:   Mon, 26 Mar 2018 12:56:38 +0200
From:   Hannes Reinecke <hare@...e.de>
To:     Johannes Thumshirn <jthumshirn@...e.de>
Cc:     "Martin K . Petersen" <martin.petersen@...cle.com>,
        Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
        Linux SCSI Mailinglist <linux-scsi@...r.kernel.org>
Subject: Re: [PATCH] scsi: don't look for NULL devices handlers by name

On Fri, 23 Mar 2018 14:37:05 +0100
Johannes Thumshirn <jthumshirn@...e.de> wrote:

> Currently scsi_dh_lookup() doesn't check for NULL as a device
> name. This combined with nvme over dm-mapth results in the following
> messages emitted by device-mapper:
> 
>  device-mapper: multipath: Could not failover device 259:67: Handler
> scsi_dh_(null) error 14.
> 
> Let scsi_dh_lookup() fail fast on NULL names.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
> ---
>  drivers/scsi/scsi_dh.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/scsi/scsi_dh.c b/drivers/scsi/scsi_dh.c
> index b88b5dbbc444..188f30572aa1 100644
> --- a/drivers/scsi/scsi_dh.c
> +++ b/drivers/scsi/scsi_dh.c
> @@ -112,6 +112,9 @@ static struct scsi_device_handler
> *scsi_dh_lookup(const char *name) {
>  	struct scsi_device_handler *dh;
>  
> +	if (!name || strlen(name) == 0)
> +		return NULL;
> +
>  	dh = __scsi_dh_lookup(name);
>  	if (!dh) {
>  		request_module("scsi_dh_%s", name);

Reviewed-by: Hannes Reinecke <hare@...e.com>

Cheers,

Hannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ