diff options
Diffstat (limited to 'fs/coda/inode.c')
-rw-r--r-- | fs/coda/inode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index be2aa4909487..cf674e9179a3 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/file.h> | 20 | #include <linux/file.h> |
21 | #include <linux/vfs.h> | 21 | #include <linux/vfs.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/pid_namespace.h> | ||
23 | 24 | ||
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
25 | 26 | ||
@@ -48,7 +49,7 @@ static struct inode *coda_alloc_inode(struct super_block *sb) | |||
48 | return NULL; | 49 | return NULL; |
49 | memset(&ei->c_fid, 0, sizeof(struct CodaFid)); | 50 | memset(&ei->c_fid, 0, sizeof(struct CodaFid)); |
50 | ei->c_flags = 0; | 51 | ei->c_flags = 0; |
51 | ei->c_uid = 0; | 52 | ei->c_uid = GLOBAL_ROOT_UID; |
52 | ei->c_cached_perm = 0; | 53 | ei->c_cached_perm = 0; |
53 | spin_lock_init(&ei->c_lock); | 54 | spin_lock_init(&ei->c_lock); |
54 | return &ei->vfs_inode; | 55 | return &ei->vfs_inode; |
@@ -157,6 +158,9 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) | |||
157 | int error; | 158 | int error; |
158 | int idx; | 159 | int idx; |
159 | 160 | ||
161 | if (task_active_pid_ns(current) != &init_pid_ns) | ||
162 | return -EINVAL; | ||
163 | |||
160 | idx = get_device_index((struct coda_mount_data *) data); | 164 | idx = get_device_index((struct coda_mount_data *) data); |
161 | 165 | ||
162 | /* Ignore errors in data, for backward compatibility */ | 166 | /* Ignore errors in data, for backward compatibility */ |