Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
	if (!m->hw_handler_name)
		return -EINVAL;

	if (hw_argc > 1) {
		char *p;