svn commit: r303921 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Wed Aug 10 15:24:17 UTC 2016


Author: mjg
Date: Wed Aug 10 15:24:15 2016
New Revision: 303921
URL: https://svnweb.freebsd.org/changeset/base/303921

Log:
  sigio: do a lockless check in funsetownlist
  
  There is no need to grab the lock first to see if sigio is used, and it
  typically is not.

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c	Wed Aug 10 15:16:28 2016	(r303920)
+++ head/sys/kern/kern_descrip.c	Wed Aug 10 15:24:15 2016	(r303921)
@@ -942,6 +942,8 @@ funsetown(struct sigio **sigiop)
 {
 	struct sigio *sigio;
 
+	if (*sigiop == NULL)
+		return;
 	SIGIO_LOCK();
 	sigio = *sigiop;
 	if (sigio == NULL) {


More information about the svn-src-head mailing list