Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fork.c: fix NULL pointer dereference when nr_threads == threads-max
I happened to forked lots of processes, and hit NULL pointer dereference. It is because in copy_process() after checking max_threads, 0 is returned but not -EAGAIN. The bug is introduced by "CRED: Detach the credentials from task_struct" (commit f1752ee). Signed-off-by: Li Zefan <[email protected]> Signed-off-by: David Howells <[email protected]> Acked-by: James Morris <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information