patch-1.3.69 linux/fs/binfmt_aout.c

Next file: linux/fs/block_dev.c
Previous file: linux/drivers/sound/uart6850.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.68/linux/fs/binfmt_aout.c linux/fs/binfmt_aout.c
@@ -415,10 +415,13 @@
 		return error;
 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
 	bss = ex.a_text + ex.a_data + ex.a_bss;
-	if (bss > len)
-		do_mmap(NULL, start_addr + len, bss-len,
-			PROT_READ|PROT_WRITE|PROT_EXEC,
-			MAP_PRIVATE|MAP_FIXED, 0);
+	if (bss > len) {
+		error = do_mmap(NULL, start_addr + len, bss-len,
+				PROT_READ|PROT_WRITE|PROT_EXEC,
+				MAP_PRIVATE|MAP_FIXED, 0);
+		if (error != start_addr + len)
+			return error;
+	}
 	return 0;
 }
 

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