mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
scsi: scsi_dh: Don't look for NULL devices handlers by name
commit 2ee5671e3a upstream.
Currently scsi_dh_lookup() doesn't check for NULL as a device name. This
combined with nvme over dm-mpath 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.
[mkp: typo fix]
Cc: <stable@vger.kernel.org> # v4.16
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
35ed0996e1
commit
0fc06286c1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user