From 9889bbac2329dbd8e20de5a4932503c1a36645fa Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 6 Jul 2015 14:09:00 +0000 Subject: [PATCH] Mutex memory is not zeroed, add MTX_NEW. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index fd50e05e9d4..e9fdc9980ee 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -583,7 +583,7 @@ aio_init_aioinfo(struct proc *p) struct kaioinfo *ki; ki = uma_zalloc(kaio_zone, M_WAITOK); - mtx_init(&ki->kaio_mtx, "aiomtx", NULL, MTX_DEF); + mtx_init(&ki->kaio_mtx, "aiomtx", NULL, MTX_DEF | MTX_NEW); ki->kaio_flags = 0; ki->kaio_maxactive_count = max_aio_per_proc; ki->kaio_active_count = 0;