patch-1.3.30 linux/kernel/fork.c

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

diff -u --recursive --new-file v1.3.29/linux/kernel/fork.c linux/kernel/fork.c
@@ -191,11 +191,11 @@
 		goto bad_fork;
 	new_stack = get_free_page(GFP_KERNEL);
 	if (!new_stack)
-		goto bad_fork_free;
+		goto bad_fork_free_p;
 	error = -EAGAIN;
 	nr = find_empty_process();
 	if (nr < 0)
-		goto bad_fork_free;
+		goto bad_fork_free_stack;
 
 	*p = *current;
 
@@ -263,8 +263,9 @@
 	task[nr] = NULL;
 	REMOVE_LINKS(p);
 	nr_tasks--;
-bad_fork_free:
+bad_fork_free_stack:
 	free_page(new_stack);
+bad_fork_free_p:
 	kfree(p);
 bad_fork:
 	return error;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this