[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070402204749.GA11774@movial.fi>
Date: Mon, 2 Apr 2007 23:47:54 +0300
From: Timo Savola <tsavola@...ial.fi>
To: miklos@...redi.hu
Cc: linux-kernel@...r.kernel.org, fuse-devel@...ts.sourceforge.net
Subject: [PATCH] FUSE: Validate rootmode mount option
If rootmode doesn't include any file type bits, we hit the BUG() in
fuse_init_inode. Now EINVAL is returned.
Signed-off-by: Timo Savola <tsavola@...ial.fi>
---
fs/fuse/inode.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 5ab8e50..503c9cd 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 ((value & S_IFMT) == 0)
+ return 0;
d->rootmode = value;
d->rootmode_present = 1;
break;
--
1.4.4.4
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists