]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/fork.c
Merge branch 'akpm-current/current'
[karo-tx-linux.git] / kernel / fork.c
index aa8296d515f03eb0c85a69c30414ae22f8ae8ba9..a17621c6cd4272182a78083e736c5972c741ed7a 100644 (file)
@@ -1089,8 +1089,10 @@ static void rt_mutex_init_task(struct task_struct *p)
 {
        raw_spin_lock_init(&p->pi_lock);
 #ifdef CONFIG_RT_MUTEXES
-       plist_head_init(&p->pi_waiters);
+       p->pi_waiters = RB_ROOT;
+       p->pi_waiters_leftmost = NULL;
        p->pi_blocked_on = NULL;
+       p->pi_top_task = NULL;
 #endif
 }
 
@@ -1174,7 +1176,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
         * do not allow it to share a thread group or signal handlers or
         * parent with the forking task.
         */
-       if (clone_flags & (CLONE_SIGHAND | CLONE_PARENT)) {
+       if (clone_flags & CLONE_SIGHAND) {
                if ((clone_flags & (CLONE_NEWUSER | CLONE_NEWPID)) ||
                    (task_active_pid_ns(current) !=
                                current->nsproxy->pid_ns_for_children))
@@ -1312,7 +1314,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
 #endif
 
        /* Perform scheduler related setup. Assign this task to a CPU. */
-       sched_fork(clone_flags, p);
+       retval = sched_fork(clone_flags, p);
+       if (retval)
+               goto bad_fork_cleanup_policy;
 
        retval = perf_event_init_task(p);
        if (retval)
@@ -1404,13 +1408,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
                p->tgid = p->pid;
        }
 
-       p->pdeath_signal = 0;
-       p->exit_state = 0;
-
        p->nr_dirtied = 0;
        p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10);
        p->dirty_paused_when = 0;
 
+       p->pdeath_signal = 0;
        INIT_LIST_HEAD(&p->thread_group);
        p->task_works = NULL;