patch-2.1.17 linux/kernel/fork.c

Next file: linux/kernel/ksyms.c
Previous file: linux/ipc/shm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.16/linux/kernel/fork.c linux/kernel/fork.c
@@ -274,7 +274,9 @@
 		goto bad_fork_cleanup_fs;
 	if (copy_mm(clone_flags, p))
 		goto bad_fork_cleanup_sighand;
-	copy_thread(nr, clone_flags, usp, p, regs);
+	error = copy_thread(nr, clone_flags, usp, p, regs);
+	if (error)
+		goto bad_fork_cleanup_sighand;
 	p->semundo = NULL;
 
 	/* ok, now we should be set up.. */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov