diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 7087d8c0e5e2..e995899ea83f 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1125,12 +1125,12 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1125 | 1125 | ||
1126 | if (pid != &init_struct_pid) { | 1126 | if (pid != &init_struct_pid) { |
1127 | retval = -ENOMEM; | 1127 | retval = -ENOMEM; |
1128 | pid = alloc_pid(task_active_pid_ns(p)); | 1128 | pid = alloc_pid(p->nsproxy->pid_ns); |
1129 | if (!pid) | 1129 | if (!pid) |
1130 | goto bad_fork_cleanup_io; | 1130 | goto bad_fork_cleanup_io; |
1131 | 1131 | ||
1132 | if (clone_flags & CLONE_NEWPID) { | 1132 | if (clone_flags & CLONE_NEWPID) { |
1133 | retval = pid_ns_prepare_proc(task_active_pid_ns(p)); | 1133 | retval = pid_ns_prepare_proc(p->nsproxy->pid_ns); |
1134 | if (retval < 0) | 1134 | if (retval < 0) |
1135 | goto bad_fork_free_pid; | 1135 | goto bad_fork_free_pid; |
1136 | } | 1136 | } |
@@ -1480,12 +1480,10 @@ void __init proc_caches_init(void) | |||
1480 | fs_cachep = kmem_cache_create("fs_cache", | 1480 | fs_cachep = kmem_cache_create("fs_cache", |
1481 | sizeof(struct fs_struct), 0, | 1481 | sizeof(struct fs_struct), 0, |
1482 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); | 1482 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1483 | vm_area_cachep = kmem_cache_create("vm_area_struct", | ||
1484 | sizeof(struct vm_area_struct), 0, | ||
1485 | SLAB_PANIC, NULL); | ||
1486 | mm_cachep = kmem_cache_create("mm_struct", | 1483 | mm_cachep = kmem_cache_create("mm_struct", |
1487 | sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, | 1484 | sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, |
1488 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); | 1485 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1486 | mmap_init(); | ||
1489 | } | 1487 | } |
1490 | 1488 | ||
1491 | /* | 1489 | /* |