Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Dec 2016 12:47:41 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r310964 - stable/11/sys/kern
Message-ID:  <201612311247.uBVClfZZ084294@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



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