aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-27 06:01:51 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-27 06:01:51 -0500
commit3ddeb51d9c83931c1ca6abf76a38934c5a1ed918 (patch)
treefc2efb59d627135ea2199a8a68415b162646b121 /kernel/fork.c
parent5a611268b69f05262936dd177205acbce4471358 (diff)
parent5ee810072175042775e39bdd3eaaa68884c27805 (diff)
Merge branch 'linus' into core/percpu
Conflicts: arch/x86/kernel/setup_percpu.c
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 5ba5f5d24899..99309df985bf 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -822,17 +822,17 @@ static void posix_cpu_timers_init_group(struct signal_struct *sig)
822static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) 822static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
823{ 823{
824 struct signal_struct *sig; 824 struct signal_struct *sig;
825 int ret;
826 825
827 if (clone_flags & CLONE_THREAD) { 826 if (clone_flags & CLONE_THREAD) {
828 ret = thread_group_cputime_clone_thread(current); 827 atomic_inc(&current->signal->count);
829 if (likely(!ret)) { 828 atomic_inc(&current->signal->live);
830 atomic_inc(&current->signal->count); 829 return 0;
831 atomic_inc(&current->signal->live);
832 }
833 return ret;
834 } 830 }
835 sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL); 831 sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL);
832
833 if (sig)
834 posix_cpu_timers_init_group(sig);
835
836 tsk->signal = sig; 836 tsk->signal = sig;
837 if (!sig) 837 if (!sig)
838 return -ENOMEM; 838 return -ENOMEM;
@@ -869,8 +869,6 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
869 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); 869 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim);
870 task_unlock(current->group_leader); 870 task_unlock(current->group_leader);
871 871
872 posix_cpu_timers_init_group(sig);
873
874 acct_init_pacct(&sig->pacct); 872 acct_init_pacct(&sig->pacct);
875 873
876 tty_audit_fork(sig); 874 tty_audit_fork(sig);