Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Dec 1995 01:35:17 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        davidg@Root.COM, j@uriah.heep.sax.de
Cc:        dufault@hda.com, freebsd-bugs@FreeBSD.ORG, gibbs@freefall.freebsd.org, hm@hcs.de, m.sapsed@bangor.ac.uk
Subject:   Re: Problem with FreeBSD 2.1.0-RELEASE
Message-ID:  <199512191435.BAA15480@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>To recall it, the symptoms are that this panic happens for some people
>with many cd drives, and _only_ when accessing the last drive.

In that case, it must be a bounds checking error.  Perhaps this one in
cd.c:

>	if(dk_ndrive < DK_NDRIVE) {
>		sprintf(dk_names[dk_ndrive], "cd%d", unit);
>		dk_wpms[dk_ndrive] = (150*1024/2);
>		SCSI_DATA(&cd_switch, unit)->dkunit = dk_ndrive++;
>	} else {
>		SCSI_DATA(&cd_switch, unit)->dkunit = -1;
		^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here the unit number for statistics is set to -1 (``none'') and statistics
aren't kept for this or subsequently attached drivers of any type.
>	}
>	...
>	if(cd->dkunit) {
	^^^^^^^^^^^^^^
Here the ``none'' unit number is assumed to be 0.  Other drivers check
correctly: `if (xd->dkunit >= 0)'.
>		dk_xfer[cd->dkunit]++;
>		dk_seek[cd->dkunit]++; /* don't know */
>		dk_wds[cd->dkunit] += bp->b_bcount >> 6;
>	}

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512191435.BAA15480>