]> git.pld-linux.org Git - packages/kernel.git/blame - linux-2.2-mremap-munmap.patch
- ported from linux-2.4.25-atmdd.patch
[packages/kernel.git] / linux-2.2-mremap-munmap.patch
CommitLineData
8749a7da 1Return proper sys_munmap() error code
2
3--- linux-2.2.25/mm/mremap.c~ Wed Feb 18 17:39:06 2004
4+++ linux-2.2.25/mm/mremap.c Wed Feb 18 17:39:06 2004
5@@ -176,9 +176,11 @@
6 * Always allow a shrinking remap: that just unmaps
7 * the unnecessary pages..
8 */
9- ret = addr;
10 if (old_len >= new_len) {
11- do_munmap(addr+new_len, old_len - new_len);
12+ ret = do_munmap(addr+new_len, old_len - new_len);
13+ if (ret && old_len != new_len)
14+ goto out;
15+ ret = addr;
16 goto out;
17 }
18
This page took 0.088644 seconds and 4 git commands to generate.