From owner-svn-src-all@FreeBSD.ORG Tue Jul 1 15:05:31 2014 Return-Path: Delivered-To: svn-src-all@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 B5B56959; Tue, 1 Jul 2014 15:05:31 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (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 AF8D92ABD; Tue, 1 Jul 2014 15:05:30 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id n15so7935501wiw.17 for ; Tue, 01 Jul 2014 08:05:29 -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:in-reply-to:references:reply-to :mime-version:content-type:content-transfer-encoding; bh=K5zfTZdxNzaHSnRl+638wu8zrSAWWvgvIjGcW2xMeqk=; b=QZCUQtLy0S+hM9fjVy3KDHwnaFMiDrIF1GGYVsJuGg5gqQUwKHmDxHPLT3oWM3N4WV I2KqWWB7ergMK2MwoZVYzdt67DK2c3r/5uH7elLEs6M89SYCyg1F7Q1bngZfy/IV59lW dkxK/EuV+bz+TNgHhupCbaF+avvf67TVs96b3mkCbvPYwBjp5lxVONdlFvUK//b50A1O KQzzi5LXjXgbaOfNJds2LFQ4lCo8Dom0SUe1acaiCSf50aj9OSWYVXiXyf4E/ju+hZ2l +Rj3Lp1rb9gI7suYHWje0BsC5/dRepYregWBl5wFIUYAG79wbBMIut2cHqqnn/Y8KIcr hRsQ== X-Received: by 10.194.88.199 with SMTP id bi7mr53692162wjb.79.1404227128944; Tue, 01 Jul 2014 08:05:28 -0700 (PDT) Received: from ernst.home (p4FC0FE50.dip0.t-ipconnect.de. [79.192.254.80]) by mx.google.com with ESMTPSA id hc4sm48681043wjc.38.2014.07.01.08.05.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 01 Jul 2014 08:05:28 -0700 (PDT) Date: Tue, 1 Jul 2014 17:05:24 +0200 From: Gary Jennejohn To: Mateusz Guzik Subject: Re: svn commit: r268074 - head/sys/kern Message-ID: <20140701170524.76e41d9a@ernst.home> In-Reply-To: <20140701141920.GC26696@dft-labs.eu> References: <201407010629.s616TFul082441@svn.freebsd.org> <201407010940.57602.jhb@freebsd.org> <20140701141920.GC26696@dft-labs.eu> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.17; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 15:05:31 -0000 On Tue, 1 Jul 2014 16:19:20 +0200 Mateusz Guzik wrote: > 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. > Also, please fix the build with gcc, which dies with an error that newsigacts may be use unitialzed. What I did was set both oldsigacts and newsigacts to NULL before this line at around 622: if (sigacts_share(p->p_sigacts)) { which allowed me to remove the else branch for setting oldsigacts to NULL. -- Gary Jennejohn