move RLIMIT_NPROC check from set_user() to do_execve_common()
[pandora-kernel.git] / kernel / fork.c
index e7ceaca..8e6b6f4 100644 (file)
@@ -1111,6 +1111,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
                    p->real_cred->user != INIT_USER)
                        goto bad_fork_free;
        }
+       current->flags &= ~PF_NPROC_EXCEEDED;
 
        retval = copy_creds(p, clone_flags);
        if (retval < 0)