diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-29 08:46:59 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-29 08:47:05 -0400 |
commit | e7fd5d4b3d240f42c30a9e3d20a4689c4d3a795a (patch) | |
tree | 4ba588631dd8189a818a91c9e3976526071178b6 /kernel/fork.c | |
parent | 1130b0296184bc21806225fd06d533515a99d2db (diff) | |
parent | 56a50adda49b2020156616c4eb15353e0f9ad7de (diff) |
Merge branch 'linus' into perfcounters/core
Merge reason: This brach was on -rc1, refresh it to almost-rc4 to pick up
the latest upstream fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 89c1efb3ccf4..d32fef4d38e5 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(¤t->signal->live); | 821 | atomic_inc(¤t->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); |