Date: Wed, 25 Jul 2001 17:10:01 -0700 (PDT) From: wea@llnl.gov To: freebsd-bugs@FreeBSD.org Subject: kern/29203: Kernel panic reading a non-fixated CD Message-ID: <200107260010.f6Q0A1U49444@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/29203; it has been noted by GNATS.
From: wea@llnl.gov
To: FreeBSD-gnats-submit@freebsd.org
Cc: wea@llnl.gov
Subject: kern/29203: Kernel panic reading a non-fixated CD
Date: Wed, 25 Jul 2001 17:00:22 -0700 (PDT)
>Submitter-Id: current-users
>Originator: Ed Alley
>Organization: Lawrence Livermore National Lab.
>Confidential: no
>Synopsis: kern/29203: Kernel panics when mounting non-fixated CD
>Severity: non-critical
>Priority: low
>Category: kern
>Class: change-request
>Release: FreeBSD 4.3-RELEASE i386
>Environment:
System: FreeBSD jordan.llnl.gov 4.3-RELEASE #0: Tue Jul 24 13:38:25 PDT 2001 wea@jordan.llnl.gov:/usr/src/sys/compile/JORDAN.5.ipfw i386
>Description:
RE: PR kern/29203
I am running FreeBSD 4.3 with an IDE HP cd-writer 9500 series.
I have previously submitted a patch for the kernel panic that
resulted after I tried to mount a non-fixated CD that I had
burned with my CD writer. The previous patch had the problem
that it tested every ATAPI read for a large bytecount including
IDE disk reads. The patch therefore also limited those reads
to a bytecount of 2G. The patch below only tests CD reads,
hence, only applies the 2G limit to CD reads. However, the
question I now have is: Are DVDs typed as CDs in the
ATAPI driver. If so then more work needs to be done here
before this patch can be accepted.
>How-To-Repeat:
Unless you have my hardware configuration you can't repeat
the error. However, I don't doubt that other CDRWs will
do something similar.
>Fix:
The patch has been improved: It now only tests the
bytecount for the case of reading a CD. This eliminates
the problem of limiting the bytecount to 2G for disk reads.
It now only does this for CDs. The only remaining
question is whether a DVD is an ATAPI_TYPE_CDROM
device type. If so then this patch is still not
complete, because a DVD can be larger than 2G.
The patch must be installed in /usr/src/sys/dev/ata as:
patch -p < patch.file
Here is the patch:
*** atapi-all.c.orig Tue Jul 24 13:21:03 2001
--- atapi-all.c Wed Jul 25 16:03:47 2001
***************
*** 382,387 ****
--- 382,397 ----
return ATA_OP_CONTINUES;
case ATAPI_P_READ:
+ if (ATP_PARAM->device_type == ATAPI_TYPE_CDROM) {
+ if ((long)request->bytecount < 0) {
+ printf("%s: %s trying to read CD with bytecount = %lu\n",
+ atp->devname, atapi_cmd2str(atp->cmd),
+ (unsigned long)request->bytecount);
+ request->result =
+ ATAPI_E_ILI | ATAPI_SK_ILLEGAL_REQUEST;
+ break;
+ }
+ }
if (!(request->flags & ATPR_F_READ)) {
request->result = inb(atp->controller->ioaddr + ATA_ERROR);
printf("%s: %s trying to read on write buffer\n",
End of patch file.
Thank-you in anticipation of your comments.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107260010.f6Q0A1U49444>
