Title: [8861] trunk/fs/binfmt_flat.c: FLAT: fix unmap len in load error path
Revision
8861
Author
vapier
Date
2010-05-28 14:16:50 -0400 (Fri, 28 May 2010)

Log Message

FLAT: fix unmap len in load error path

The data chunk is mmaped with 'len' which remains unchanged, so use that
when unmapping in the error path rather than trying to recalculate (and
incorrectly so) the value used originally.

Modified Paths

Diff

Modified: trunk/fs/binfmt_flat.c (8860 => 8861)


--- trunk/fs/binfmt_flat.c	2010-05-27 22:46:46 UTC (rev 8860)
+++ trunk/fs/binfmt_flat.c	2010-05-28 18:16:50 UTC (rev 8861)
@@ -597,7 +597,7 @@
 		if (IS_ERR_VALUE(result)) {
 			printk("Unable to read data+bss, errno %d\n", (int)-result);
 			do_munmap(current->mm, textpos, text_len);
-			do_munmap(current->mm, realdatastart, data_len + extra);
+			do_munmap(current->mm, realdatastart, len);
 			ret = result;
 			goto err;
 		}
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to