]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- argh. for all 2.4.x < 2.4.25-rc4 (taken from linux 2.4 bk)
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 18 Feb 2004 13:20:33 +0000 (13:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    linux-2.4-mremap-munmap.patch -> 1.1

linux-2.4-mremap-munmap.patch [new file with mode: 0644]

diff --git a/linux-2.4-mremap-munmap.patch b/linux-2.4-mremap-munmap.patch
new file mode 100644 (file)
index 0000000..e0219e7
--- /dev/null
@@ -0,0 +1,30 @@
+Changes for mm/mremap.c@1.8
+andrea@de[marcelo]
+Return proper do_munmap() error code
+
+--- 1.7/mm/mremap.c    Wed Feb 18 04:53:26 2004
++++ 1.8/mm/mremap.c    Wed Feb 18 04:53:26 2004
+@@ -258,16 +258,20 @@
+               if ((addr <= new_addr) && (addr+old_len) > new_addr)
+                       goto out;
+-              do_munmap(current->mm, new_addr, new_len);
++              ret = do_munmap(current->mm, new_addr, new_len);
++              if (ret && new_len)
++                      goto out;
+       }
+       /*
+        * Always allow a shrinking remap: that just unmaps
+        * the unnecessary pages..
+        */
+-      ret = addr;
+       if (old_len >= new_len) {
+-              do_munmap(current->mm, addr+new_len, old_len - new_len);
++              ret = do_munmap(current->mm, addr+new_len, old_len - new_len);
++              if (ret && old_len != new_len)
++                      goto out;
++              ret = addr;
+               if (!(flags & MREMAP_FIXED) || (new_addr == addr))
+                       goto out;
+       }
This page took 0.07273 seconds and 4 git commands to generate.