bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] vm: fix vm_map_enter


From: Justus Winter
Subject: [PATCH] vm: fix vm_map_enter
Date: Fri, 5 Sep 2014 14:53:53 +0200

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]