diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2010-09-30 11:58:31 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-10-20 15:38:22 -0700 |
commit | 010e3b48fca57920557d2b80b83f8b2899fb5d1e (patch) | |
tree | df18bbb03fe34602412df792094dfbb6d6dca20e /net/ceph/ceph_common.c | |
parent | 6f453ed6c07dbed83b368269c9c0fb170866ee71 (diff) | |
download | lwn-010e3b48fca57920557d2b80b83f8b2899fb5d1e.tar.gz lwn-010e3b48fca57920557d2b80b83f8b2899fb5d1e.zip |
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 <yehuda@hq.newdream.net>
Diffstat (limited to 'net/ceph/ceph_common.c')
-rw-r--r-- | net/ceph/ceph_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |