Commit 6657719390cd05be45f4e3b501d8bb46889c0a19

Authored by Al Viro
1 parent 1ba1068186

make sure that nsproxy_cache is initialized early enough

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 3 changed files with 3 additions and 3 deletions Side-by-side Diff

include/linux/nsproxy.h
... ... @@ -68,6 +68,7 @@
68 68 void free_nsproxy(struct nsproxy *ns);
69 69 int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **,
70 70 struct fs_struct *);
  71 +int __init nsproxy_cache_init(void);
71 72  
72 73 static inline void put_nsproxy(struct nsproxy *ns)
73 74 {
... ... @@ -1574,6 +1574,7 @@
1574 1574 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK, NULL);
1575 1575 vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC);
1576 1576 mmap_init();
  1577 + nsproxy_cache_init();
1577 1578 }
1578 1579  
1579 1580 /*
... ... @@ -271,11 +271,9 @@
271 271 return err;
272 272 }
273 273  
274   -static int __init nsproxy_cache_init(void)
  274 +int __init nsproxy_cache_init(void)
275 275 {
276 276 nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC);
277 277 return 0;
278 278 }
279   -
280   -module_init(nsproxy_cache_init);