diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-mpath.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index d880299334e9..f25bdebcb4ab 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -705,6 +705,11 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m) | |||
705 | if (!hw_argc) | 705 | if (!hw_argc) |
706 | return 0; | 706 | return 0; |
707 | 707 | ||
708 | if (hw_argc > as->argc) { | ||
709 | ti->error = "not enough arguments for hardware handler"; | ||
710 | return -EINVAL; | ||
711 | } | ||
712 | |||
708 | m->hw_handler_name = kstrdup(shift(as), GFP_KERNEL); | 713 | m->hw_handler_name = kstrdup(shift(as), GFP_KERNEL); |
709 | request_module("scsi_dh_%s", m->hw_handler_name); | 714 | request_module("scsi_dh_%s", m->hw_handler_name); |
710 | if (scsi_dh_handler_exist(m->hw_handler_name) == 0) { | 715 | if (scsi_dh_handler_exist(m->hw_handler_name) == 0) { |