From a410ffa472b8eb78e1564fb2de137e2daf28dae2 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 10 Oct 2001 20:43:50 +0000 Subject: Malloc mutexes pre-zero'd as random garbage (including 0xdeadcode) my trigget the check to make sure we don't initalize a mutex twice. --- sys/kern/subr_rman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/subr_rman.c') 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); -- cgit v1.1