aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-04-20 12:08:07 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-20 12:08:12 -0400
commit62d170290979e0bb805d969cca4ea852bdd45260 (patch)
tree837372297501a2d144358b44e7db3f88c5612aa2 /kernel/fork.c
parent8b5b94e4e9813cdd77103827f48d58c806ab45c6 (diff)
parentd91dfbb41bb2e9bdbfbd2cc7078ed7436eab027a (diff)
Merge branch 'linus' into x86/urgent
Merge reason: We need the x86/uv updates from upstream, to queue up dependent fix. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 989c7c202b3d..b9e2edd00726 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -800,6 +800,12 @@ static void posix_cpu_timers_init_group(struct signal_struct *sig)
800 sig->cputime_expires.virt_exp = cputime_zero; 800 sig->cputime_expires.virt_exp = cputime_zero;
801 sig->cputime_expires.sched_exp = 0; 801 sig->cputime_expires.sched_exp = 0;
802 802
803 if (sig->rlim[RLIMIT_CPU].rlim_cur != RLIM_INFINITY) {
804 sig->cputime_expires.prof_exp =
805 secs_to_cputime(sig->rlim[RLIMIT_CPU].rlim_cur);
806 sig->cputimer.running = 1;
807 }
808
803 /* The timer lists. */ 809 /* The timer lists. */
804 INIT_LIST_HEAD(&sig->cpu_timers[0]); 810 INIT_LIST_HEAD(&sig->cpu_timers[0]);
805 INIT_LIST_HEAD(&sig->cpu_timers[1]); 811 INIT_LIST_HEAD(&sig->cpu_timers[1]);
@@ -815,11 +821,8 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
815 atomic_inc(&current->signal->live); 821 atomic_inc(&current->signal->live);
816 return 0; 822 return 0;
817 } 823 }
818 sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL);
819
820 if (sig)
821 posix_cpu_timers_init_group(sig);
822 824
825 sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL);
823 tsk->signal = sig; 826 tsk->signal = sig;
824 if (!sig) 827 if (!sig)
825 return -ENOMEM; 828 return -ENOMEM;
@@ -859,6 +862,8 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
859 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); 862 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim);
860 task_unlock(current->group_leader); 863 task_unlock(current->group_leader);
861 864
865 posix_cpu_timers_init_group(sig);
866
862 acct_init_pacct(&sig->pacct); 867 acct_init_pacct(&sig->pacct);
863 868
864 tty_audit_fork(sig); 869 tty_audit_fork(sig);