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/subr_rman.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/subr_rman.c')
-rw-r--r-- | sys/kern/subr_rman.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index f9941da..1fbafd3 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -99,7 +99,7 @@ rman_init(struct rman *rm) panic("implement RMAN_GAUGE"); TAILQ_INIT(&rm->rm_list); - rm->rm_mtx = malloc(sizeof *rm->rm_mtx, M_RMAN, M_NOWAIT); + rm->rm_mtx = malloc(sizeof *rm->rm_mtx, M_RMAN, M_NOWAIT | M_ZERO); if (rm->rm_mtx == 0) return ENOMEM; mtx_init(rm->rm_mtx, "rman", MTX_DEF); |