2.6.32-longterm review patch.  If anyone has any objections, please let us know.

------------------

From: Mike Snitzer <[email protected]>

commit 286f367dad40beb3234a18c17391d03ba939a7f3 upstream.

Avoid dereferencing a NULL pointer if the number of feature arguments
supplied is fewer than indicated.

Signed-off-by: Mike Snitzer <[email protected]>
Signed-off-by: Alasdair G Kergon <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/md/dm-mpath.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -778,6 +778,11 @@ static int parse_features(struct arg_set
        if (!argc)
                return 0;
 
+       if (argc > as->argc) {
+               ti->error = "not enough arguments for features";
+               return -EINVAL;
+       }
+
        do {
                param_name = shift(as);
                argc--;


_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to