aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c1
-rw-r--r--kernel/fork.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 4c70c377d21f..4a72f1753edb 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -149,6 +149,7 @@ static void __exit_signal(struct task_struct *tsk)
149 * see account_group_exec_runtime(). 149 * see account_group_exec_runtime().
150 */ 150 */
151 task_rq_unlock_wait(tsk); 151 task_rq_unlock_wait(tsk);
152 tty_kref_put(sig->tty);
152 __cleanup_signal(sig); 153 __cleanup_signal(sig);
153 } 154 }
154} 155}
diff --git a/kernel/fork.c b/kernel/fork.c
index 2e9cc3139ec6..b7879ef6e7cd 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -892,7 +892,6 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
892void __cleanup_signal(struct signal_struct *sig) 892void __cleanup_signal(struct signal_struct *sig)
893{ 893{
894 thread_group_cputime_free(sig); 894 thread_group_cputime_free(sig);
895 tty_kref_put(sig->tty);
896 kmem_cache_free(signal_cachep, sig); 895 kmem_cache_free(signal_cachep, sig);
897} 896}
898 897
@@ -1263,7 +1262,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1263 p->nsproxy->pid_ns->child_reaper = p; 1262 p->nsproxy->pid_ns->child_reaper = p;
1264 1263
1265 p->signal->leader_pid = pid; 1264 p->signal->leader_pid = pid;
1266 tty_kref_put(p->signal->tty);
1267 p->signal->tty = tty_kref_get(current->signal->tty); 1265 p->signal->tty = tty_kref_get(current->signal->tty);
1268 attach_pid(p, PIDTYPE_PGID, task_pgrp(current)); 1266 attach_pid(p, PIDTYPE_PGID, task_pgrp(current));
1269 attach_pid(p, PIDTYPE_SID, task_session(current)); 1267 attach_pid(p, PIDTYPE_SID, task_session(current));