]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
make sure that nsproxy_cache is initialized early enough
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 28 Jun 2011 19:41:10 +0000 (15:41 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 20 Jul 2011 05:44:07 +0000 (01:44 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/nsproxy.h
kernel/fork.c
kernel/nsproxy.c

index 50d20aba57d3067c4fdd42680c7ca0b7b938ede0..cc37a55ad004391597661e13071f3c6e1c708c19 100644 (file)
@@ -68,6 +68,7 @@ void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new);
 void free_nsproxy(struct nsproxy *ns);
 int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **,
        struct fs_struct *);
+int __init nsproxy_cache_init(void);
 
 static inline void put_nsproxy(struct nsproxy *ns)
 {
index 0276c30401a081132d1e4fadac663f3afdf292c0..31fa13e63b709e917f5165ba5a422cc68c3e812b 100644 (file)
@@ -1574,6 +1574,7 @@ void __init proc_caches_init(void)
                        SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK, NULL);
        vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC);
        mmap_init();
+       nsproxy_cache_init();
 }
 
 /*
index d6a00f3de15d59b3e1bcb8ebcc32373e447df180..9aeab4b98c6431f8b8a17ee97992925d34c3a427 100644 (file)
@@ -271,10 +271,8 @@ out:
        return err;
 }
 
-static int __init nsproxy_cache_init(void)
+int __init nsproxy_cache_init(void)
 {
        nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC);
        return 0;
 }
-
-module_init(nsproxy_cache_init);