patch-2.0.33 linux/fs/exec.c

Next file: linux/include/asm-i386/locks.h
Previous file: linux/fs/buffer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.32/linux/fs/exec.c linux/fs/exec.c
@@ -397,7 +397,12 @@
 
 		old_mm = current->mm;
 		current->mm = mm;
-		new_page_tables(current);
+		if (new_page_tables(current)) {
+			current->mm = old_mm;
+			exit_mmap(mm);
+			kfree(mm);
+			return -ENOMEM;
+		}
 
 		if ((old_mm != &init_mm) && (!--old_mm->count)) {
 			/*

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