summaryrefslogtreecommitdiff
path: root/debian/patches/0001-vm-fix-vm_map_enter.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0001-vm-fix-vm_map_enter.patch')
-rw-r--r--debian/patches/0001-vm-fix-vm_map_enter.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/0001-vm-fix-vm_map_enter.patch b/debian/patches/0001-vm-fix-vm_map_enter.patch
new file mode 100644
index 0000000..a01cbdf
--- /dev/null
+++ b/debian/patches/0001-vm-fix-vm_map_enter.patch
@@ -0,0 +1,33 @@
+From 0c961dfdeda6e757068479d7876697b931a2780e Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Fri, 5 Sep 2014 14:13:42 +0200
+Subject: [PATCH] vm: fix vm_map_enter
+
+Previously, vm_map_enter returned KERN_NO_SPACE if ADDRESS is out of
+range even if ANYWHERE was given.
+
+* vm/vm_map.c (vm_map_enter): Pick a suitable address if the given
+address is out of bounds and anywhere is given.
+---
+ vm/vm_map.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/vm/vm_map.c b/vm/vm_map.c
+index 6b13724..fe4aae1 100644
+--- a/vm/vm_map.c
++++ b/vm/vm_map.c
+@@ -781,10 +781,8 @@ kern_return_t vm_map_enter(
+ * Calculate the first possible address.
+ */
+
+- if (start < map->min_offset)
++ if (start < map->min_offset || start > map->max_offset)
+ start = map->min_offset;
+- if (start > map->max_offset)
+- RETURN(KERN_NO_SPACE);
+
+ /*
+ * Look for the first possible address;
+--
+2.1.0
+