Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Dec 2017 11:18:19 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326429 - head/sys/kern
Message-ID:  <201712011118.vB1BIJwH096046@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Dec  1 11:18:19 2017
New Revision: 326429
URL: https://svnweb.freebsd.org/changeset/base/326429

Log:
  Destroy seltd st_mtx and st_wait in seltdfini().
  
  A correct destruction is important for WITNESS(4) and LOCK_PROFILING(9).
  
  Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
  MFC after:	1 week

Modified:
  head/sys/kern/sys_generic.c

Modified: head/sys/kern/sys_generic.c
==============================================================================
--- head/sys/kern/sys_generic.c	Fri Dec  1 11:14:13 2017	(r326428)
+++ head/sys/kern/sys_generic.c	Fri Dec  1 11:18:19 2017	(r326429)
@@ -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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712011118.vB1BIJwH096046>