diff options
author | jhb <jhb@FreeBSD.org> | 2001-10-10 20:43:50 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-10-10 20:43:50 +0000 |
commit | a410ffa472b8eb78e1564fb2de137e2daf28dae2 (patch) | |
tree | 18d54d7ccbfd2890542a65a38e01ff57ad937a8a /sys/kern/kern_lock.c | |
parent | 33c3770bff2aa5b67301c544f2ee3f522052d736 (diff) | |
download | FreeBSD-src-a410ffa472b8eb78e1564fb2de137e2daf28dae2.zip FreeBSD-src-a410ffa472b8eb78e1564fb2de137e2daf28dae2.tar.gz |
Malloc mutexes pre-zero'd as random garbage (including 0xdeadcode) my
trigget the check to make sure we don't initalize a mutex twice.
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r-- | sys/kern/kern_lock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index a2835c3..351643e 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -102,7 +102,7 @@ lockmgr_init(void *dummy __unused) } lock_mtx_array = (struct mtx *)malloc(sizeof(struct mtx) * lock_nmtx, - M_CACHE, M_WAITOK); + M_CACHE, M_WAITOK | M_ZERO); for (i = 0; i < lock_nmtx; i++) mtx_init(&lock_mtx_array[i], "lockmgr interlock", MTX_DEF); } |