Date: Fri, 1 Dec 2017 08:20:40 +0100 From: Sebastian Huber <sebastian.huber@embedded-brains.de> To: freebsd-hackers@freebsd.org Subject: [PATCH] Destroy seltd st_mtx and st_wait in seltdfini() Message-ID: <20171201072040.19831-1-sebastian.huber@embedded-brains.de>
next in thread | raw e-mail | index | archive | help
A correct destruction is important for WITNESS(4) and LOCK_PROFILING(9). --- sys/kern/sys_generic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 546b183ee87..c5b410fe8bd 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1884,6 +1884,8 @@ seltdfini(struct thread *td) if (stp->st_free2) uma_zfree(selfd_zone, stp->st_free2); td->td_sel = NULL; + cv_destroy(&stp->st_wait); + mtx_destroy(&stp->st_mtx); free(stp, M_SELECT); } -- 2.12.3
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171201072040.19831-1-sebastian.huber>