Commit f97dc421 authored by tang.junhui's avatar tang.junhui Committed by Mike Snitzer

dm mpath: add m->hw_handler_name NULL pointer check in parse_hw_handler()

Avoids false positive of no hardware handler being specified (which is
implied by a NULL m->hw_handler_name).
Signed-off-by: default avatartang.junhui <tang.junhui@zte.com.cn>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent bff7e067
...@@ -1002,6 +1002,8 @@ static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m) ...@@ -1002,6 +1002,8 @@ static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m)
} }
m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL); m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL);
if (!m->hw_handler_name)
return -EINVAL;
if (hw_argc > 1) { if (hw_argc > 1) {
char *p; char *p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment