Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

make sure that nsproxy_cache is initialized early enough

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

Al Viro 66577193 1ba10681

+3 -3
+1
include/linux/nsproxy.h
··· 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 {
+1
kernel/fork.c
··· 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 /*
+1 -3
kernel/nsproxy.c
··· 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);