diff options
author | kientzle <kientzle@FreeBSD.org> | 2013-07-25 03:48:37 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2013-07-25 03:48:37 +0000 |
commit | 8ef3c0b12c3b89ce81e384e9511bc1347e58a845 (patch) | |
tree | 6d1054371c2e0b8aa8dca21843277021322c11ea /sys/vm/vm_map.c | |
parent | 9149b14da104f28d3ff25a05c13b3007014a9134 (diff) | |
download | FreeBSD-src-8ef3c0b12c3b89ce81e384e9511bc1347e58a845.zip FreeBSD-src-8ef3c0b12c3b89ce81e384e9511bc1347e58a845.tar.gz |
Clear entire map structure including locks so that the
locks don't accidentally appear to have been already
initialized.
In particular, this fixes a consistent kernel crash on
armv6 with:
panic: lock "vm map (user)" 0xc09cc050 already initialized
that appeared with r251709.
PR: arm/180820
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r-- | sys/vm/vm_map.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 9cf8827..c43bce2 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -239,8 +239,7 @@ vm_map_zinit(void *mem, int size, int flags) vm_map_t map; map = (vm_map_t)mem; - map->nentries = 0; - map->size = 0; + memset(map, 0, sizeof(*map)); mtx_init(&map->system_mtx, "vm map (system)", NULL, MTX_DEF | MTX_DUPOK); sx_init(&map->lock, "vm map (user)"); return (0); |