diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 728d5be9548c..294189fc7ac8 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -537,6 +537,7 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p) | |||
537 | spin_lock_init(&mm->page_table_lock); | 537 | spin_lock_init(&mm->page_table_lock); |
538 | mm_init_aio(mm); | 538 | mm_init_aio(mm); |
539 | mm_init_owner(mm, p); | 539 | mm_init_owner(mm, p); |
540 | clear_tlb_flush_pending(mm); | ||
540 | 541 | ||
541 | if (likely(!mm_alloc_pgd(mm))) { | 542 | if (likely(!mm_alloc_pgd(mm))) { |
542 | mm->def_flags = 0; | 543 | mm->def_flags = 0; |
@@ -1086,8 +1087,10 @@ static void rt_mutex_init_task(struct task_struct *p) | |||
1086 | { | 1087 | { |
1087 | raw_spin_lock_init(&p->pi_lock); | 1088 | raw_spin_lock_init(&p->pi_lock); |
1088 | #ifdef CONFIG_RT_MUTEXES | 1089 | #ifdef CONFIG_RT_MUTEXES |
1089 | plist_head_init(&p->pi_waiters); | 1090 | p->pi_waiters = RB_ROOT; |
1091 | p->pi_waiters_leftmost = NULL; | ||
1090 | p->pi_blocked_on = NULL; | 1092 | p->pi_blocked_on = NULL; |
1093 | p->pi_top_task = NULL; | ||
1091 | #endif | 1094 | #endif |
1092 | } | 1095 | } |
1093 | 1096 | ||
@@ -1171,7 +1174,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1171 | * do not allow it to share a thread group or signal handlers or | 1174 | * do not allow it to share a thread group or signal handlers or |
1172 | * parent with the forking task. | 1175 | * parent with the forking task. |
1173 | */ | 1176 | */ |
1174 | if (clone_flags & (CLONE_SIGHAND | CLONE_PARENT)) { | 1177 | if (clone_flags & CLONE_SIGHAND) { |
1175 | if ((clone_flags & (CLONE_NEWUSER | CLONE_NEWPID)) || | 1178 | if ((clone_flags & (CLONE_NEWUSER | CLONE_NEWPID)) || |
1176 | (task_active_pid_ns(current) != | 1179 | (task_active_pid_ns(current) != |
1177 | current->nsproxy->pid_ns_for_children)) | 1180 | current->nsproxy->pid_ns_for_children)) |
@@ -1310,7 +1313,9 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1310 | #endif | 1313 | #endif |
1311 | 1314 | ||
1312 | /* Perform scheduler related setup. Assign this task to a CPU. */ | 1315 | /* Perform scheduler related setup. Assign this task to a CPU. */ |
1313 | sched_fork(clone_flags, p); | 1316 | retval = sched_fork(clone_flags, p); |
1317 | if (retval) | ||
1318 | goto bad_fork_cleanup_policy; | ||
1314 | 1319 | ||
1315 | retval = perf_event_init_task(p); | 1320 | retval = perf_event_init_task(p); |
1316 | if (retval) | 1321 | if (retval) |
@@ -1402,13 +1407,11 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1402 | p->tgid = p->pid; | 1407 | p->tgid = p->pid; |
1403 | } | 1408 | } |
1404 | 1409 | ||
1405 | p->pdeath_signal = 0; | ||
1406 | p->exit_state = 0; | ||
1407 | |||
1408 | p->nr_dirtied = 0; | 1410 | p->nr_dirtied = 0; |
1409 | p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10); | 1411 | p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10); |
1410 | p->dirty_paused_when = 0; | 1412 | p->dirty_paused_when = 0; |
1411 | 1413 | ||
1414 | p->pdeath_signal = 0; | ||
1412 | INIT_LIST_HEAD(&p->thread_group); | 1415 | INIT_LIST_HEAD(&p->thread_group); |
1413 | p->task_works = NULL; | 1416 | p->task_works = NULL; |
1414 | 1417 | ||