diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index e0d0b77343f8..fb8572a42297 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -263,7 +263,7 @@ static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) | |||
263 | rb_parent = &tmp->vm_rb; | 263 | rb_parent = &tmp->vm_rb; |
264 | 264 | ||
265 | mm->map_count++; | 265 | mm->map_count++; |
266 | retval = copy_page_range(mm, oldmm, tmp); | 266 | retval = copy_page_range(mm, oldmm, mpnt); |
267 | 267 | ||
268 | if (tmp->vm_ops && tmp->vm_ops->open) | 268 | if (tmp->vm_ops && tmp->vm_ops->open) |
269 | tmp->vm_ops->open(tmp); | 269 | tmp->vm_ops->open(tmp); |
@@ -1124,8 +1124,6 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1124 | if (unlikely(p->ptrace & PT_PTRACED)) | 1124 | if (unlikely(p->ptrace & PT_PTRACED)) |
1125 | __ptrace_link(p, current->parent); | 1125 | __ptrace_link(p, current->parent); |
1126 | 1126 | ||
1127 | cpuset_fork(p); | ||
1128 | |||
1129 | attach_pid(p, PIDTYPE_PID, p->pid); | 1127 | attach_pid(p, PIDTYPE_PID, p->pid); |
1130 | attach_pid(p, PIDTYPE_TGID, p->tgid); | 1128 | attach_pid(p, PIDTYPE_TGID, p->tgid); |
1131 | if (thread_group_leader(p)) { | 1129 | if (thread_group_leader(p)) { |
@@ -1135,13 +1133,14 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1135 | __get_cpu_var(process_counts)++; | 1133 | __get_cpu_var(process_counts)++; |
1136 | } | 1134 | } |
1137 | 1135 | ||
1138 | proc_fork_connector(p); | ||
1139 | if (!current->signal->tty && p->signal->tty) | 1136 | if (!current->signal->tty && p->signal->tty) |
1140 | p->signal->tty = NULL; | 1137 | p->signal->tty = NULL; |
1141 | 1138 | ||
1142 | nr_threads++; | 1139 | nr_threads++; |
1143 | total_forks++; | 1140 | total_forks++; |
1144 | write_unlock_irq(&tasklist_lock); | 1141 | write_unlock_irq(&tasklist_lock); |
1142 | proc_fork_connector(p); | ||
1143 | cpuset_fork(p); | ||
1145 | retval = 0; | 1144 | retval = 0; |
1146 | 1145 | ||
1147 | fork_out: | 1146 | fork_out: |