aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2011-08-02 07:32:00 -0400
committerAlasdair G Kergon <agk@redhat.com>2011-08-02 07:32:00 -0400
commit286f367dad40beb3234a18c17391d03ba939a7f3 (patch)
tree50e7b04332ce6e8ab920284528d555e67aae2081 /drivers/md
parent762a80d9fc9f690a3a35983f3b4619a220650808 (diff)
dm mpath: fix potential NULL pointer in feature arg processing
Avoid dereferencing a NULL pointer if the number of feature arguments supplied is fewer than indicated. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: stable@kernel.org
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-mpath.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index c3547016f0f1..adf851a081bd 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -807,6 +807,11 @@ static int parse_features(struct arg_set *as, struct multipath *m)
807 if (!argc) 807 if (!argc)
808 return 0; 808 return 0;
809 809
810 if (argc > as->argc) {
811 ti->error = "not enough arguments for features";
812 return -EINVAL;
813 }
814
810 do { 815 do {
811 param_name = shift(as); 816 param_name = shift(as);
812 argc--; 817 argc--;