]> err.no Git - linux-2.6/blobdiff - kernel/fork.c
[PATCH] pci_ids: remove non-referenced symbols from pci_ids.h
[linux-2.6] / kernel / fork.c
index 8149f3602881db80727310245436c97a661adf2a..280bd44ac4411634c0eb845c01be8ca3a5f22b7c 100644 (file)
@@ -848,7 +848,7 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p)
 {
        unsigned long new_flags = p->flags;
 
-       new_flags &= ~PF_SUPERPRIV;
+       new_flags &= ~(PF_SUPERPRIV | PF_NOFREEZE);
        new_flags |= PF_FORKNOEXEC;
        if (!(clone_flags & CLONE_PTRACE))
                p->ptrace = 0;
@@ -1062,7 +1062,8 @@ static task_t *copy_process(unsigned long clone_flags,
         * parent's CPU). This avoids alot of nasty races.
         */
        p->cpus_allowed = current->cpus_allowed;
-       if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed)))
+       if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) ||
+                       !cpu_online(task_cpu(p))))
                set_task_cpu(p, smp_processor_id());
 
        /*