From owner-freebsd-scsi@FreeBSD.ORG Fri Feb 20 07:32:15 2004 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A90A16A4CE; Fri, 20 Feb 2004 07:32:15 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id C169143D2D; Fri, 20 Feb 2004 07:32:14 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.9/8.12.5) with ESMTP id i1KFWELX016918; Fri, 20 Feb 2004 08:32:14 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.9/8.12.5/Submit) id i1KFWDeb016917; Fri, 20 Feb 2004 08:32:13 -0700 (MST) (envelope-from ken) Date: Fri, 20 Feb 2004 08:32:13 -0700 From: "Kenneth D. Merry" To: Colin Percival Message-ID: <20040220153213.GA16894@panzer.kdm.org> References: <6.0.1.1.1.20040220151626.03b34568@imap.sfu.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.0.1.1.1.20040220151626.03b34568@imap.sfu.ca> User-Agent: Mutt/1.4.1i cc: rwatson@freebsd.org cc: scsi@freebsd.org Subject: Re: commit approval X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2004 15:32:15 -0000 On Fri, Feb 20, 2004 at 15:22:04 +0000, Colin Percival wrote: > Dear mentor and scsi maintainers, > Is the following commit ok? > > Colin Percival > > Log: > Check that periph is non-NULL before dereferencing it. > > Reported by: "Ted Unangst" > > Index: src/sys/cam/scsi/scsi_da.c > =================================================================== > RCS file: /home/ncvs/src/sys/cam/scsi/scsi_da.c,v > retrieving revision 1.163 > diff -u -r1.163 scsi_da.c > --- src/sys/cam/scsi/scsi_da.c 18 Feb 2004 21:36:50 -0000 1.163 > +++ src/sys/cam/scsi/scsi_da.c 20 Feb 2004 14:59:52 -0000 > @@ -464,11 +464,11 @@ > > s = splsoftcam(); > periph = (struct cam_periph *)dp->d_drv1; > - unit = periph->unit_number; > if (periph == NULL) { > splx(s); > return (ENXIO); > } > + unit = periph->unit_number; > > softc = (struct da_softc *)periph->softc; > Looks fine, feel free to commit. Ken -- Kenneth Merry ken@FreeBSD.org