summaryrefslogtreecommitdiffstats
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
authorTimo Savola2007-04-09 01:04:00 +0200
committerLinus Torvalds2007-04-09 04:47:55 +0200
commita5bfffac645a7b2d8119f8bbae34df5c94832799 (patch)
tree20081cd9ae9afebd6899dd35d5d685ed6fca5440 /fs/fuse/inode.c
parentsched.c: Remove unused variable 'relative' (diff)
downloadkernel-qcow2-linux-a5bfffac645a7b2d8119f8bbae34df5c94832799.tar.gz
kernel-qcow2-linux-a5bfffac645a7b2d8119f8bbae34df5c94832799.tar.xz
kernel-qcow2-linux-a5bfffac645a7b2d8119f8bbae34df5c94832799.zip
[PATCH] fuse: validate rootmode mount option
If rootmode isn't valid, we hit the BUG() in fuse_init_inode. Now EINVAL is returned. Signed-off-by: Timo Savola <tsavola@movial.fi> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r--fs/fuse/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 5ab8e50e7808..608db81219a0 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -330,6 +330,8 @@ static int parse_fuse_opt(char *opt, struct fuse_mount_data *d, int is_bdev)
case OPT_ROOTMODE:
if (match_octal(&args[0], &value))
return 0;
+ if (!fuse_valid_type(value))
+ return 0;
d->rootmode = value;
d->rootmode_present = 1;
break;