From owner-p4-projects@FreeBSD.ORG Tue Jan 9 20:33:12 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 06A7E16A40F; Tue, 9 Jan 2007 20:33:12 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C452716A407; Tue, 9 Jan 2007 20:33:11 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.176.14]) by mx1.freebsd.org (Postfix) with ESMTP id 5778613C45E; Tue, 9 Jan 2007 20:33:11 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.8/8.13.7) with ESMTP id l09KX89N032459 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Jan 2007 21:33:08 +0100 (CET) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.8/8.13.3/Submit) id l09KX84P032458; Tue, 9 Jan 2007 21:33:08 +0100 (CET) Date: Tue, 9 Jan 2007 21:33:08 +0100 From: Divacky Roman To: John Baldwin Message-ID: <20070109203308.GA32081@stud.fit.vutbr.cz> References: <200701050802.l0582Gnq067583@repoman.freebsd.org> <200701051232.28019.jhb@freebsd.org> <20070106144030.GB1353@stud.fit.vutbr.cz> <200701091317.06685.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200701091317.06685.jhb@freebsd.org> User-Agent: Mutt/1.4.2.2i X-Scanned-By: MIMEDefang 2.57 on 147.229.176.14 Cc: Roman Divacky , Perforce Change Reviews Subject: Re: PERFORCE change 112535 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2007 20:33:12 -0000 On Tue, Jan 09, 2007 at 01:17:06PM -0500, John Baldwin wrote: > > > > @@ -237,12 +237,10 @@ > > > > > > > > pr = td->td_ucred->cr_prison; > > > > if (pr != NULL) { > > > > - mtx_lock(&pr->pr_mtx); > > > > if (pr->pr_linux != NULL) { > > > > lpr = (struct linux_prison *)pr->pr_linux; > > > > use26 = lpr->pr_use_linux26; > > > > } > > > > - mtx_unlock(&pr->pr_mtx); > > > > } else > > > > use26 = linux_use_linux26; > > > > > > > > > > > > > > Hmm, what is use26 set to if pr != NULL but pr->pr_linux == NULL? > > > > to the default value of 0 > > Shouldn't it be set to linux_use_26 in that case? as I understand the code such condition should not happen under normal condition and is a sign of something bad's going on. so its better to be safe and not enable the "higher" emulation. the point is - a defined value is returned and it even happens to be the same value (0) as the linux_use_26.