Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2017 00:31:00 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324733 - head/sys/kern
Message-ID:  <201710190031.v9J0V06e030133@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Thu Oct 19 00:31:00 2017
New Revision: 324733
URL: https://svnweb.freebsd.org/changeset/base/324733

Log:
  sysvsem: check if semu_list has anything on it before grabbing the lock
  
  This should get a process-specific support instead.
  
  MFC after:	1 week

Modified:
  head/sys/kern/sysv_sem.c

Modified: head/sys/kern/sysv_sem.c
==============================================================================
--- head/sys/kern/sysv_sem.c	Wed Oct 18 22:56:46 2017	(r324732)
+++ head/sys/kern/sysv_sem.c	Thu Oct 19 00:31:00 2017	(r324733)
@@ -1412,6 +1412,8 @@ semexit_myhook(void *arg, struct proc *p)
 	 * Go through the chain of undo vectors looking for one
 	 * associated with this process.
 	 */
+	if (LIST_EMPTY(&semu_list))
+		return;
 	SEMUNDO_LOCK();
 	LIST_FOREACH(suptr, &semu_list, un_next) {
 		if (suptr->un_proc == p)



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