aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 7b8f2a78be3d..7087d8c0e5e2 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -820,14 +820,15 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
820 int ret; 820 int ret;
821 821
822 if (clone_flags & CLONE_THREAD) { 822 if (clone_flags & CLONE_THREAD) {
823 ret = thread_group_cputime_clone_thread(current); 823 atomic_inc(&current->signal->count);
824 if (likely(!ret)) { 824 atomic_inc(&current->signal->live);
825 atomic_inc(&current->signal->count); 825 return 0;
826 atomic_inc(&current->signal->live);
827 }
828 return ret;
829 } 826 }
830 sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL); 827 sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL);
828
829 if (sig)
830 posix_cpu_timers_init_group(sig);
831
831 tsk->signal = sig; 832 tsk->signal = sig;
832 if (!sig) 833 if (!sig)
833 return -ENOMEM; 834 return -ENOMEM;
@@ -864,8 +865,6 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
864 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); 865 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim);
865 task_unlock(current->group_leader); 866 task_unlock(current->group_leader);
866 867
867 posix_cpu_timers_init_group(sig);
868
869 acct_init_pacct(&sig->pacct); 868 acct_init_pacct(&sig->pacct);
870 869
871 tty_audit_fork(sig); 870 tty_audit_fork(sig);