From owner-svn-src-head@freebsd.org Wed Aug 10 15:24:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0EECBB53DA; Wed, 10 Aug 2016 15:24:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A12081D97; Wed, 10 Aug 2016 15:24:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7AFOG4D015922; Wed, 10 Aug 2016 15:24:16 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7AFOGW7015920; Wed, 10 Aug 2016 15:24:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201608101524.u7AFOGW7015920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 10 Aug 2016 15:24:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303921 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 15:24:17 -0000 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) {