* [PATCH] scsi: don't look for NULL devices handlers by name
@ 2018-03-23 13:37 Johannes Thumshirn
2018-03-26 10:56 ` Hannes Reinecke
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2018-03-23 13:37 UTC (permalink / raw)
To: Martin K . Petersen
Cc: Linux Kernel Mailinglist, Linux SCSI Mailinglist,
Hannes Reinecke, Johannes Thumshirn
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@suse.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);
--
2.13.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: don't look for NULL devices handlers by name
2018-03-23 13:37 [PATCH] scsi: don't look for NULL devices handlers by name Johannes Thumshirn
@ 2018-03-26 10:56 ` Hannes Reinecke
2018-03-26 23:00 ` Bart Van Assche
2018-03-28 22:16 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2018-03-26 10:56 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Martin K . Petersen, Linux Kernel Mailinglist, Linux SCSI Mailinglist
On Fri, 23 Mar 2018 14:37:05 +0100
Johannes Thumshirn <jthumshirn@suse.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@suse.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@suse.com>
Cheers,
Hannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: don't look for NULL devices handlers by name
2018-03-23 13:37 [PATCH] scsi: don't look for NULL devices handlers by name Johannes Thumshirn
2018-03-26 10:56 ` Hannes Reinecke
@ 2018-03-26 23:00 ` Bart Van Assche
2018-03-28 22:16 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2018-03-26 23:00 UTC (permalink / raw)
To: jthumshirn, martin.petersen; +Cc: linux-scsi, linux-kernel, hare
On Fri, 2018-03-23 at 14:37 +0100, Johannes Thumshirn 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.
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: don't look for NULL devices handlers by name
2018-03-23 13:37 [PATCH] scsi: don't look for NULL devices handlers by name Johannes Thumshirn
2018-03-26 10:56 ` Hannes Reinecke
2018-03-26 23:00 ` Bart Van Assche
@ 2018-03-28 22:16 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2018-03-28 22:16 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Martin K . Petersen, Linux Kernel Mailinglist,
Linux SCSI Mailinglist, Hannes Reinecke
Johannes,
> 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:
Applied to 4.16/scsi-fixes. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-28 22:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23 13:37 [PATCH] scsi: don't look for NULL devices handlers by name Johannes Thumshirn
2018-03-26 10:56 ` Hannes Reinecke
2018-03-26 23:00 ` Bart Van Assche
2018-03-28 22:16 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).