From owner-freebsd-scsi@FreeBSD.ORG Fri Feb 20 07:22:11 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 4108C16A4CE for ; Fri, 20 Feb 2004 07:22:11 -0800 (PST) Received: from tx1.oucs.ox.ac.uk (tx1.oucs.ox.ac.uk [129.67.1.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1920043D1F for ; Fri, 20 Feb 2004 07:22:11 -0800 (PST) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan1.oucs.ox.ac.uk ([129.67.1.166] helo=localhost) by tx1.oucs.ox.ac.uk with esmtp (Exim 4.24) id 1AuCTi-000810-Gy for scsi@freebsd.org; Fri, 20 Feb 2004 15:22:10 +0000 Received: from rx1.oucs.ox.ac.uk ([129.67.1.165]) by localhost (scan1.oucs.ox.ac.uk [129.67.1.166]) (amavisd-new, port 25) with ESMTP id 30747-02 for ; Fri, 20 Feb 2004 15:22:10 +0000 (GMT) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx1.oucs.ox.ac.uk with smtp (Exim 4.24) id 1AuCTi-00080t-3W for scsi@freebsd.org; Fri, 20 Feb 2004 15:22:10 +0000 Received: (qmail 14116 invoked by uid 0); 20 Feb 2004 15:22:10 -0000 Received: from colin.percival@wadham.ox.ac.uk by gateway by uid 71 with qmail-scanner-1.16 (sweep: 2.14/3.71. spamassassin: 2.53. Clear:. Processed in 1.73765 secs); 20 Feb 2004 15:22:10 -0000 X-Qmail-Scanner-Mail-From: colin.percival@wadham.ox.ac.uk via gateway X-Qmail-Scanner: 1.16 (Clear:. Processed in 1.73765 secs) Received: from dhcp1131.wadham.ox.ac.uk (HELO piii600.wadham.ox.ac.uk) (163.1.161.131) by gateway.wadham.ox.ac.uk with SMTP; 20 Feb 2004 15:22:08 -0000 Message-Id: <6.0.1.1.1.20040220151626.03b34568@imap.sfu.ca> X-Sender: cperciva@imap.sfu.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Fri, 20 Feb 2004 15:22:04 +0000 To: rwatson@freebsd.org, scsi@freebsd.org From: Colin Percival Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: 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:22:11 -0000 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;