From e1f92ccc73bacbb396ff631c2991ce9ef7cc8e38 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 15 Jun 2014 07:52:59 +0000 Subject: [PATCH] One of the intentions behind r267254 was that the global variable "sgrowsiz" would be read once and cached in a local variable so that the resource limit check and map entry insertion would be guaranteed to use the same value. However, the value being passed to vm_map_insert() is still from "sgrowsiz" and not the local variable. Correct this oversight. Reviewed by: kib --- sys/vm/vm_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index cfafc270365..a379d14f251 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -3388,7 +3388,7 @@ vm_map_stack(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize, rv = KERN_NO_SPACE; goto out; } - rv = vm_map_stack_locked(map, addrbos, max_ssize, sgrowsiz, prot, + rv = vm_map_stack_locked(map, addrbos, max_ssize, growsize, prot, max, cow); out: vm_map_unlock(map);