From owner-freebsd-stable Sun Nov 12 17:26:24 2000 Delivered-To: freebsd-stable@freebsd.org Received: from midten.fast.no (midten.fast.no [213.188.8.11]) by hub.freebsd.org (Postfix) with ESMTP id 2B80137B479 for ; Sun, 12 Nov 2000 17:26:21 -0800 (PST) Received: from fast.no (IDENT:tegge@midten.fast.no [213.188.8.11]) by midten.fast.no (8.9.3/8.9.3) with ESMTP id CAA44222; Mon, 13 Nov 2000 02:26:07 +0100 (CET) Message-Id: <200011130126.CAA44222@midten.fast.no> To: iwaki@bc.niigata-u.ac.jp Cc: freebsd-stable@FreeBSD.ORG Subject: Re: mount operation causes my 4.2-BETA system down From: Tor.Egge@fast.no In-Reply-To: Your message of "Sun, 12 Nov 2000 16:57:18 +0900" References: <20001112075719.65.qmail@pikachu.bsp.bc.niigata-u.ac.jp> X-Mailer: Mew version 1.70 on Emacs 19.34.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 13 Nov 2000 02:26:07 +0100 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Trying to mount an audio CD from ATAPI, I met system down on > 4.2-BETA. > > % mount -r /dev/racd0c /mnt > > This operation maybe nonsense, but the system should not be in > panic. The crash is due to the atapi-cd driver trying to read 9408 bytes when ffs_mountfs() asked for 8192 bytes. If you're lucky then your machine crashes. Corruption of other buffers is worse. --- atapi-cd.c.orig Wed Oct 25 17:24:48 2000 +++ atapi-cd.c Mon Nov 13 01:11:59 2000 @@ -1149,7 +1149,7 @@ lastlba = cdp->info.volsize; } - count = (bp->b_bcount + (blocksize - 1)) / blocksize; + count = bp->b_bcount / blocksize; if (bp->b_flags & B_READ) { /* if transfer goes beyond range adjust it to be within limits */ - Tor Egge To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message