aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 54b15f8cda53..ac8100e3088a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -114,8 +114,6 @@ void __put_task_struct(struct task_struct *tsk)
114 WARN_ON(atomic_read(&tsk->usage)); 114 WARN_ON(atomic_read(&tsk->usage));
115 WARN_ON(tsk == current); 115 WARN_ON(tsk == current);
116 116
117 if (unlikely(tsk->audit_context))
118 audit_free(tsk);
119 security_task_free(tsk); 117 security_task_free(tsk);
120 free_uid(tsk->user); 118 free_uid(tsk->user);
121 put_group_info(tsk->group_info); 119 put_group_info(tsk->group_info);
@@ -180,6 +178,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
180 atomic_set(&tsk->usage,2); 178 atomic_set(&tsk->usage,2);
181 atomic_set(&tsk->fs_excl, 0); 179 atomic_set(&tsk->fs_excl, 0);
182 tsk->btrace_seq = 0; 180 tsk->btrace_seq = 0;
181 tsk->splice_pipe = NULL;
183 return tsk; 182 return tsk;
184} 183}
185 184
@@ -1204,7 +1203,7 @@ static task_t *copy_process(unsigned long clone_flags,
1204 attach_pid(p, PIDTYPE_PGID, process_group(p)); 1203 attach_pid(p, PIDTYPE_PGID, process_group(p));
1205 attach_pid(p, PIDTYPE_SID, p->signal->session); 1204 attach_pid(p, PIDTYPE_SID, p->signal->session);
1206 1205
1207 list_add_tail(&p->tasks, &init_task.tasks); 1206 list_add_tail_rcu(&p->tasks, &init_task.tasks);
1208 __get_cpu_var(process_counts)++; 1207 __get_cpu_var(process_counts)++;
1209 } 1208 }
1210 attach_pid(p, PIDTYPE_PID, p->pid); 1209 attach_pid(p, PIDTYPE_PID, p->pid);