aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 144326b7af50..043b5d88049b 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -152,8 +152,7 @@ void __put_task_struct(struct task_struct *tsk)
152 WARN_ON(atomic_read(&tsk->usage)); 152 WARN_ON(atomic_read(&tsk->usage));
153 WARN_ON(tsk == current); 153 WARN_ON(tsk == current);
154 154
155 put_cred(tsk->real_cred); 155 exit_creds(tsk);
156 put_cred(tsk->cred);
157 delayacct_tsk_free(tsk); 156 delayacct_tsk_free(tsk);
158 157
159 if (!profile_handoff_task(tsk)) 158 if (!profile_handoff_task(tsk))
@@ -1307,8 +1306,7 @@ bad_fork_cleanup_put_domain:
1307 module_put(task_thread_info(p)->exec_domain->module); 1306 module_put(task_thread_info(p)->exec_domain->module);
1308bad_fork_cleanup_count: 1307bad_fork_cleanup_count:
1309 atomic_dec(&p->cred->user->processes); 1308 atomic_dec(&p->cred->user->processes);
1310 put_cred(p->real_cred); 1309 exit_creds(p);
1311 put_cred(p->cred);
1312bad_fork_free: 1310bad_fork_free:
1313 free_task(p); 1311 free_task(p);
1314fork_out: 1312fork_out: