From owner-cvs-all@FreeBSD.ORG Mon Apr 2 17:40:39 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 788C016A405; Mon, 2 Apr 2007 17:40:39 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 61D2E13C480; Mon, 2 Apr 2007 17:40:39 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 2B9D01A4D94; Mon, 2 Apr 2007 10:40:39 -0700 (PDT) Date: Mon, 2 Apr 2007 10:40:39 -0700 From: Alfred Perlstein To: Bruce Evans Message-ID: <20070402174039.GW61362@elvis.mu.org> References: <200703311608.l2VG8oNE086672@repoman.freebsd.org> <20070401064404.B9096@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070401064404.B9096@besplex.bde.org> User-Agent: Mutt/1.4.2.2i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Robert Watson , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_lookup.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2007 17:40:39 -0000 * Bruce Evans [070331 13:48] wrote: > On Sat, 31 Mar 2007, Robert Watson wrote: > > >rwatson 2007-03-31 16:08:50 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/kern vfs_lookup.c > > Log: > > Rather than ignoring any error return from getnewvnode() in nameiinit(), > > explicitly test and panic. This should not ever happen, but if it does, > > this is a preferred failure mode to a NULL pointer dereference in kernel. > > No, a null pointer dereference is far preferable since it takes less code > and is easier to debug. Perhaps for the developer, but because of kernel differences it's preferable to have a known panic location, ie 'pc' will be different for different kernel configs and different platforms whereas a panic will be static across all deployments. That said, a KASSERT might be more appropriate, admittedly I haven't checked to see if that's what was inserted. -- - Alfred Perlstein