diff options
author | Mike Snitzer <snitzer@redhat.com> | 2011-08-02 12:32:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-04 21:58:43 -0700 |
commit | eb81cf19f5740d1397a72d1abb59570e1dda2711 (patch) | |
tree | 10289bf0289a7c5fb89b6086fb861a5ad0d666c7 /drivers | |
parent | b41ed9c38a42daa4b474ebf18eb06ef1f17351f5 (diff) | |
download | kernel_samsung_tuna-eb81cf19f5740d1397a72d1abb59570e1dda2711.zip kernel_samsung_tuna-eb81cf19f5740d1397a72d1abb59570e1dda2711.tar.gz kernel_samsung_tuna-eb81cf19f5740d1397a72d1abb59570e1dda2711.tar.bz2 |
dm mpath: fix potential NULL pointer in feature arg processing
commit 286f367dad40beb3234a18c17391d03ba939a7f3 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-mpath.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index aa4e570..209991b 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) if (!argc) return 0; + if (argc > as->argc) { + ti->error = "not enough arguments for features"; + return -EINVAL; + } + do { param_name = shift(as); argc--; |