]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.2-mremap-munmap.patch
- obsolete
[packages/kernel.git] / linux-2.2-mremap-munmap.patch
1 Return 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.023701 seconds and 3 git commands to generate.