diff options
Diffstat (limited to 'fs/afs/super.c')
-rw-r--r-- | fs/afs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/afs/super.c b/fs/afs/super.c index 43165009428d..7c31ec399575 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <linux/parser.h> | 24 | #include <linux/parser.h> |
25 | #include <linux/statfs.h> | 25 | #include <linux/statfs.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/nsproxy.h> | ||
28 | #include <net/net_namespace.h> | ||
27 | #include "internal.h" | 29 | #include "internal.h" |
28 | 30 | ||
29 | #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */ | 31 | #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */ |
@@ -363,6 +365,10 @@ static struct dentry *afs_mount(struct file_system_type *fs_type, | |||
363 | 365 | ||
364 | memset(¶ms, 0, sizeof(params)); | 366 | memset(¶ms, 0, sizeof(params)); |
365 | 367 | ||
368 | ret = -EINVAL; | ||
369 | if (current->nsproxy->net_ns != &init_net) | ||
370 | goto error; | ||
371 | |||
366 | /* parse the options and device name */ | 372 | /* parse the options and device name */ |
367 | if (options) { | 373 | if (options) { |
368 | ret = afs_parse_options(¶ms, options, &dev_name); | 374 | ret = afs_parse_options(¶ms, options, &dev_name); |