diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 8dd8ff281009..39d22b3357de 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1045,6 +1045,10 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1045 | copy_flags(clone_flags, p); | 1045 | copy_flags(clone_flags, p); |
1046 | INIT_LIST_HEAD(&p->children); | 1046 | INIT_LIST_HEAD(&p->children); |
1047 | INIT_LIST_HEAD(&p->sibling); | 1047 | INIT_LIST_HEAD(&p->sibling); |
1048 | #ifdef CONFIG_PREEMPT_RCU | ||
1049 | p->rcu_read_lock_nesting = 0; | ||
1050 | p->rcu_flipctr_idx = 0; | ||
1051 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | ||
1048 | p->vfork_done = NULL; | 1052 | p->vfork_done = NULL; |
1049 | spin_lock_init(&p->alloc_lock); | 1053 | spin_lock_init(&p->alloc_lock); |
1050 | 1054 | ||
@@ -1059,6 +1063,11 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1059 | p->prev_utime = cputime_zero; | 1063 | p->prev_utime = cputime_zero; |
1060 | p->prev_stime = cputime_zero; | 1064 | p->prev_stime = cputime_zero; |
1061 | 1065 | ||
1066 | #ifdef CONFIG_DETECT_SOFTLOCKUP | ||
1067 | p->last_switch_count = 0; | ||
1068 | p->last_switch_timestamp = 0; | ||
1069 | #endif | ||
1070 | |||
1062 | #ifdef CONFIG_TASK_XACCT | 1071 | #ifdef CONFIG_TASK_XACCT |
1063 | p->rchar = 0; /* I/O counter: bytes read */ | 1072 | p->rchar = 0; /* I/O counter: bytes read */ |
1064 | p->wchar = 0; /* I/O counter: bytes written */ | 1073 | p->wchar = 0; /* I/O counter: bytes written */ |
@@ -1196,6 +1205,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1196 | #ifdef TIF_SYSCALL_EMU | 1205 | #ifdef TIF_SYSCALL_EMU |
1197 | clear_tsk_thread_flag(p, TIF_SYSCALL_EMU); | 1206 | clear_tsk_thread_flag(p, TIF_SYSCALL_EMU); |
1198 | #endif | 1207 | #endif |
1208 | clear_all_latency_tracing(p); | ||
1199 | 1209 | ||
1200 | /* Our parent execution domain becomes current domain | 1210 | /* Our parent execution domain becomes current domain |
1201 | These must match for thread signalling to apply */ | 1211 | These must match for thread signalling to apply */ |
@@ -1237,6 +1247,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1237 | * parent's CPU). This avoids alot of nasty races. | 1247 | * parent's CPU). This avoids alot of nasty races. |
1238 | */ | 1248 | */ |
1239 | p->cpus_allowed = current->cpus_allowed; | 1249 | p->cpus_allowed = current->cpus_allowed; |
1250 | p->rt.nr_cpus_allowed = current->rt.nr_cpus_allowed; | ||
1240 | if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) || | 1251 | if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) || |
1241 | !cpu_online(task_cpu(p)))) | 1252 | !cpu_online(task_cpu(p)))) |
1242 | set_task_cpu(p, smp_processor_id()); | 1253 | set_task_cpu(p, smp_processor_id()); |