diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-24 04:11:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-24 04:11:23 -0400 |
commit | 416dfdcdb894432547ead4fcb9fa6a36b396059e (patch) | |
tree | 8033fdda07397a59c5fa98c88927040906ce6c1a /kernel/fork.c | |
parent | 56449f437add737a1e5e1cb7e00f63ac8ead1938 (diff) | |
parent | 091069740304c979f957ceacec39c461d0192158 (diff) |
Merge commit 'v2.6.30-rc3' into tracing/hw-branch-tracing
Conflicts:
arch/x86/kernel/ptrace.c
Merge reason: fix the conflict above, and also pick up the CONFIG_BROKEN
dependency change from upstream so that we can remove it
here.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 69bde7a22e9b..7d10c46cbb4e 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -645,6 +645,9 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk) | |||
645 | 645 | ||
646 | tsk->min_flt = tsk->maj_flt = 0; | 646 | tsk->min_flt = tsk->maj_flt = 0; |
647 | tsk->nvcsw = tsk->nivcsw = 0; | 647 | tsk->nvcsw = tsk->nivcsw = 0; |
648 | #ifdef CONFIG_DETECT_HUNG_TASK | ||
649 | tsk->last_switch_count = tsk->nvcsw + tsk->nivcsw; | ||
650 | #endif | ||
648 | 651 | ||
649 | tsk->mm = NULL; | 652 | tsk->mm = NULL; |
650 | tsk->active_mm = NULL; | 653 | tsk->active_mm = NULL; |
@@ -797,6 +800,12 @@ static void posix_cpu_timers_init_group(struct signal_struct *sig) | |||
797 | sig->cputime_expires.virt_exp = cputime_zero; | 800 | sig->cputime_expires.virt_exp = cputime_zero; |
798 | sig->cputime_expires.sched_exp = 0; | 801 | sig->cputime_expires.sched_exp = 0; |
799 | 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 | |||
800 | /* The timer lists. */ | 809 | /* The timer lists. */ |
801 | INIT_LIST_HEAD(&sig->cpu_timers[0]); | 810 | INIT_LIST_HEAD(&sig->cpu_timers[0]); |
802 | INIT_LIST_HEAD(&sig->cpu_timers[1]); | 811 | INIT_LIST_HEAD(&sig->cpu_timers[1]); |
@@ -812,11 +821,8 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) | |||
812 | atomic_inc(¤t->signal->live); | 821 | atomic_inc(¤t->signal->live); |
813 | return 0; | 822 | return 0; |
814 | } | 823 | } |
815 | sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL); | ||
816 | |||
817 | if (sig) | ||
818 | posix_cpu_timers_init_group(sig); | ||
819 | 824 | ||
825 | sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL); | ||
820 | tsk->signal = sig; | 826 | tsk->signal = sig; |
821 | if (!sig) | 827 | if (!sig) |
822 | return -ENOMEM; | 828 | return -ENOMEM; |
@@ -856,6 +862,8 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) | |||
856 | memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); | 862 | memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); |
857 | task_unlock(current->group_leader); | 863 | task_unlock(current->group_leader); |
858 | 864 | ||
865 | posix_cpu_timers_init_group(sig); | ||
866 | |||
859 | acct_init_pacct(&sig->pacct); | 867 | acct_init_pacct(&sig->pacct); |
860 | 868 | ||
861 | tty_audit_fork(sig); | 869 | tty_audit_fork(sig); |
@@ -1032,11 +1040,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1032 | 1040 | ||
1033 | p->default_timer_slack_ns = current->timer_slack_ns; | 1041 | p->default_timer_slack_ns = current->timer_slack_ns; |
1034 | 1042 | ||
1035 | #ifdef CONFIG_DETECT_SOFTLOCKUP | ||
1036 | p->last_switch_count = 0; | ||
1037 | p->last_switch_timestamp = 0; | ||
1038 | #endif | ||
1039 | |||
1040 | task_io_accounting_init(&p->ioac); | 1043 | task_io_accounting_init(&p->ioac); |
1041 | acct_clear_integrals(p); | 1044 | acct_clear_integrals(p); |
1042 | 1045 | ||