aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/Kconfig4
-rw-r--r--net/ceph/ceph_common.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/net/ceph/Kconfig b/net/ceph/Kconfig
index cc04dd667a10..e50cc69ae8ca 100644
--- a/net/ceph/Kconfig
+++ b/net/ceph/Kconfig
@@ -1,6 +1,6 @@
1config CEPH_LIB 1config CEPH_LIB
2 tristate "Ceph core library (EXPERIMENTAL)" 2 tristate "Ceph core library"
3 depends on INET && EXPERIMENTAL 3 depends on INET
4 select LIBCRC32C 4 select LIBCRC32C
5 select CRYPTO_AES 5 select CRYPTO_AES
6 select CRYPTO 6 select CRYPTO
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
index c5605ae96714..e65e6e4be38b 100644
--- a/net/ceph/ceph_common.c
+++ b/net/ceph/ceph_common.c
@@ -15,6 +15,8 @@
15#include <linux/slab.h> 15#include <linux/slab.h>
16#include <linux/statfs.h> 16#include <linux/statfs.h>
17#include <linux/string.h> 17#include <linux/string.h>
18#include <linux/nsproxy.h>
19#include <net/net_namespace.h>
18 20
19 21
20#include <linux/ceph/ceph_features.h> 22#include <linux/ceph/ceph_features.h>
@@ -308,6 +310,9 @@ ceph_parse_options(char *options, const char *dev_name,
308 int err = -ENOMEM; 310 int err = -ENOMEM;
309 substring_t argstr[MAX_OPT_ARGS]; 311 substring_t argstr[MAX_OPT_ARGS];
310 312
313 if (current->nsproxy->net_ns != &init_net)
314 return ERR_PTR(-EINVAL);
315
311 opt = kzalloc(sizeof(*opt), GFP_KERNEL); 316 opt = kzalloc(sizeof(*opt), GFP_KERNEL);
312 if (!opt) 317 if (!opt)
313 return ERR_PTR(-ENOMEM); 318 return ERR_PTR(-ENOMEM);