commit approval
Colin Percival
colin.percival at wadham.ox.ac.uk
Fri Feb 20 07:22:11 PST 2004
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 at 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;
More information about the freebsd-scsi
mailing list