svn commit: r324733 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Thu Oct 19 00:31:02 UTC 2017


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)


More information about the svn-src-all mailing list