From: Yehuda Sadeh Date: Thu, 30 Sep 2010 18:58:31 +0000 (-0700) Subject: ceph: don't crash when passed bad mount options X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=010e3b48fca57920557d2b80b83f8b2899fb5d1e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ceph: don't crash when passed bad mount options This only happened when parse_extra_token was not passed to ceph_parse_option() (hence, only happened in rbd). Signed-off-by: Yehuda Sadeh --- diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index f6f2eebc0767..f3e4a13fea0c 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c @@ -249,7 +249,7 @@ int ceph_parse_options(struct ceph_options **popt, char *options, continue; err = -EINVAL; token = match_token((char *)c, opt_tokens, argstr); - if (token < 0) { + if (token < 0 && parse_extra_token) { /* extra? */ err = parse_extra_token((char *)c, private); if (err < 0) {