dm mpath: fix NULL pointer dereference when path parameters missing
authorAlasdair G Kergon <agk@redhat.com>
Thu, 12 Aug 2010 03:13:49 +0000 (04:13 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:41:43 +0000 (16:41 -0700)
commit 6bbf79a14080a0c61212f53b4b87dc1a99fedf9c upstream.

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

Signed-off-by: Patrick LoPresti <lopresti@gmail.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm-mpath.c

index 32d0b878ecccb5ac3b7878d68adc677ebc6aa880..f336c695908217610a0d4a66e0ae2e27a68e85a0 100644 (file)
@@ -691,6 +691,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;
                }