diff options
author | Matthew D Fleming <mdf@FreeBSD.org> | 2012-07-15 20:29:48 +0000 |
---|---|---|
committer | Matthew D Fleming <mdf@FreeBSD.org> | 2012-07-15 20:29:48 +0000 |
commit | f806cdcf9939339b794c22c62e9d9ac7e9f06027 (patch) | |
tree | 2a0f83e86809435c7447ffbd609f73783ac90342 /sys/vm/vm_map.h | |
parent | 5e20b91dbeba38dc715d5b42fa2b064c13a9750b (diff) | |
download | src-f806cdcf9939339b794c22c62e9d9ac7e9f06027.tar.gz src-f806cdcf9939339b794c22c62e9d9ac7e9f06027.zip |
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
Notes
Notes:
svn path=/head/; revision=238502
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r-- | sys/vm/vm_map.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 056eac5ce675..b3b1ad47ad6a 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); } |