Date: Fri, 20 Feb 2004 15:22:04 +0000 From: Colin Percival <colin.percival@wadham.ox.ac.uk> To: rwatson@freebsd.org, scsi@freebsd.org Subject: commit approval Message-ID: <6.0.1.1.1.20040220151626.03b34568@imap.sfu.ca>
next in thread | raw e-mail | index | archive | help
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" <tedu@coverity.com> 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.0.1.1.1.20040220151626.03b34568>