svn commit: r310964 - stable/11/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Sat Dec 31 12:47:42 UTC 2016


Author: mjg
Date: Sat Dec 31 12:47:41 2016
New Revision: 310964
URL: https://svnweb.freebsd.org/changeset/base/310964

Log:
  MFC r303921:
  
      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:
  stable/11/sys/kern/kern_descrip.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/kern_descrip.c
==============================================================================
--- stable/11/sys/kern/kern_descrip.c	Sat Dec 31 12:41:42 2016	(r310963)
+++ stable/11/sys/kern/kern_descrip.c	Sat Dec 31 12:47:41 2016	(r310964)
@@ -939,6 +939,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-all mailing list