summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.h
diff options
context:
space:
mode:
authormdf <mdf@FreeBSD.org>2012-07-15 20:29:48 +0000
committermdf <mdf@FreeBSD.org>2012-07-15 20:29:48 +0000
commita42ef9b109ee5ee45250fc3bbaa770c3e62a0de4 (patch)
tree2a0f83e86809435c7447ffbd609f73783ac90342 /sys/vm/vm_map.h
parent2357a49326f12023cbed9f16a7a74841c1e49b97 (diff)
downloadFreeBSD-src-a42ef9b109ee5ee45250fc3bbaa770c3e62a0de4.zip
FreeBSD-src-a42ef9b109ee5ee45250fc3bbaa770c3e62a0de4.tar.gz
Fix a bug with memguard(9) on 32-bit architectures without a
VM_KMEM_MAX_SIZE. The code was not taking into account the size of the kernel_map, which the kmem_map is allocated from, so it could produce a sub-map size too large to fit. The simplest solution is to ignore VM_KMEM_MAX entirely and base the memguard map's size off the kernel_map's size, since this is always relevant and always smaller. Found by: Justin Hibbits
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r--sys/vm/vm_map.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index 056eac5..b3b1ad4 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -200,13 +200,13 @@ struct vm_map {
#ifdef _KERNEL
static __inline vm_offset_t
-vm_map_max(vm_map_t map)
+vm_map_max(const struct vm_map *map)
{
return (map->max_offset);
}
static __inline vm_offset_t
-vm_map_min(vm_map_t map)
+vm_map_min(const struct vm_map *map)
{
return (map->min_offset);
}
OpenPOWER on IntegriCloud