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 e6c04d462ab2..aab8579c6093 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))
@@ -1297,8 +1296,7 @@ bad_fork_cleanup_put_domain:
1297 module_put(task_thread_info(p)->exec_domain->module); 1296 module_put(task_thread_info(p)->exec_domain->module);
1298bad_fork_cleanup_count: 1297bad_fork_cleanup_count:
1299 atomic_dec(&p->cred->user->processes); 1298 atomic_dec(&p->cred->user->processes);
1300 put_cred(p->real_cred); 1299 exit_creds(p);
1301 put_cred(p->cred);
1302bad_fork_free: 1300bad_fork_free:
1303 free_task(p); 1301 free_task(p);
1304fork_out: 1302fork_out: