From: Li Zefan Date: Fri, 6 Feb 2009 08:17:19 +0000 (+0000) Subject: fork.c: fix NULL pointer dereference when nr_threads == threads-max X-Git-Tag: v2.6.29-rc4~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04ec93fe9bc98e3bd8560f79f56fed66dfae40d5;p=pandora-kernel.git 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 f1752eec6145c97163dbce62d17cf5d928e28a27). Signed-off-by: Li Zefan Signed-off-by: David Howells Acked-by: James Morris Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed