From: Mike Snitzer <snitzer@redhat.com> Date: Tue, 8 Feb 2011 18:49:09 -0500 Subject: [md] dm-mpath: fix NULL deref when path parameter missing Message-id: <1297190949-29149-10-git-send-email-snitzer@redhat.com> Patchwork-id: 33175 O-Subject: [RHEL5.7 PATCH 8/8] dm mpath: fix NULL pointer dereference when path parameters missing Bugzilla: 673058 RH-Acked-by: Alasdair G Kergon <agk@redhat.com> BZ 673058 Upstream commit 6bbf79a14080a0c61212f53b4b87dc1a99fedf9c Author: Alasdair G Kergon <agk@redhat.com> Date: Thu Aug 12 04:13:49 2010 +0100 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> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index b7afe41..33df897 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -693,6 +693,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; }