Ver Fonte

dm mpath: fix NULL pointer dereference when path parameters missing

multipath_ctr() forgets to return an error after detecting
missing path parameters.  Fix this.

Signed-off-by: Patrick LoPresti <lopresti@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Alasdair G Kergon há 15 anos atrás
pai
commit
6bbf79a140
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      drivers/md/dm-mpath.c

+ 1 - 0
drivers/md/dm-mpath.c

@@ -706,6 +706,7 @@ static struct priority_group *parse_priority_group(struct arg_set *as,
 
 		if (as->argc < nr_params) {
 			ti->error = "not enough path parameters";
+			r = -EINVAL;
 			goto bad;
 		}