From owner-svn-src-head@FreeBSD.ORG Tue Jul 1 14:19:26 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DB8999E; Tue, 1 Jul 2014 14:19:26 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9793E25E8; Tue, 1 Jul 2014 14:19:25 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id cc10so7927542wib.12 for ; Tue, 01 Jul 2014 07:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=a2OnOAXlbOgnin1spTNsTbSVIBqzS88oss5wG5mwBOg=; b=WApoEy2Ymup/ovXIGBoXNvQprk3YDd9uv8NywWm5Mxntk/Ll8szEb4OK08xty9TYC1 QNjOGI53nc75fgdN5u/OHde/spHdUZkZ3QZfFnV2hwLN8YVbIenkSnNtMEEMoqsF+4/+ Jj9iAl8r8MmuQvJ077SpJgfyP2weni0R36Th5TjXHNpKVu6McsPitdfOsYzR7fBn0lkx PTfTn7yvkS7KRG0Dvazy6p6wAieI8uWpyFu+W70+OXbNA/ve0FY9PLVu8L/4iLq1jbtb ET3qPl3cFNx0TOZuOiV38XBo10KreQKdQxmtsCOAf2jMgBn9xtqkGNZUa6kVeOfG348Z 6izg== X-Received: by 10.180.82.7 with SMTP id e7mr36612259wiy.74.1404224363695; Tue, 01 Jul 2014 07:19:23 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id eo4sm43837601wid.4.2014.07.01.07.19.22 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 01 Jul 2014 07:19:23 -0700 (PDT) Date: Tue, 1 Jul 2014 16:19:20 +0200 From: Mateusz Guzik To: John Baldwin Subject: Re: svn commit: r268074 - head/sys/kern Message-ID: <20140701141920.GC26696@dft-labs.eu> References: <201407010629.s616TFul082441@svn.freebsd.org> <201407010940.57602.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201407010940.57602.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 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: Tue, 01 Jul 2014 14:19:26 -0000 On Tue, Jul 01, 2014 at 09:40:57AM -0400, John Baldwin wrote: > On Tuesday, July 01, 2014 2:29:15 am Mateusz Guzik wrote: > > Modified: head/sys/kern/kern_sig.c > > > ============================================================================== > > --- head/sys/kern/kern_sig.c Tue Jul 1 06:23:48 2014 (r268073) > > +++ head/sys/kern/kern_sig.c Tue Jul 1 06:29:15 2014 (r268074) > > @@ -3453,10 +3453,6 @@ sigacts_copy(struct sigacts *dest, struc > > int > > sigacts_shared(struct sigacts *ps) > > { > > - int shared; > > > > - mtx_lock(&ps->ps_mtx); > > - shared = ps->ps_refcnt > 1; > > - mtx_unlock(&ps->ps_mtx); > > - return (shared); > > + return (ps->ps_refcnt > 1); > > } > > You should KASSERT() in sigacts_shared that P_HADTHREADS is not set so that > new code does not call this function unsafely in the future. > Looks more like !P_HADTHREADS || p->p_singlethread != NULL on the first sight, but yeah, I'll add an assertion. Thanks, -- Mateusz Guzik