NetBSD Problem Report #34688
From jakllsch@santraginus.kollasch.net Sun Oct 1 18:26:13 2006
Return-Path: <jakllsch@santraginus.kollasch.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 3E93263B911
for <gnats-bugs@gnats.NetBSD.org>; Sun, 1 Oct 2006 18:26:13 +0000 (UTC)
Message-Id: <20061001182606.F381F23E2EE@santraginus.kollasch.net>
Date: Sun, 1 Oct 2006 13:26:06 -0500 (CDT)
From: jakllsch@kollasch.net
Reply-To: jakllsch@kollasch.net
To: gnats-bugs@NetBSD.org
Subject: cd(4) regression
X-Send-Pr-Version: 3.95
>Number: 34688
>Category: kern
>Synopsis: cd(4) can't read all of a DVD anymore
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: mlelstv
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 01 18:30:00 +0000 2006
>Closed-Date: Sun Oct 08 07:54:29 +0000 2006
>Last-Modified: Sun Oct 08 07:54:29 +0000 2006
>Originator: Jonathan A. Kollasch
>Release: NetBSD 4.0_BETA
>Organization:
>Environment:
System: NetBSD santraginus.kollasch.net 4.0_BETA NetBSD 4.0_BETA (SANTRAGINUS) #1: Thu Sep 14 15:07:32 CDT 2006 root@santraginus.kollasch.net:/usr/src/sys/arch/i386/compile/SANTRAGINUS i386
Architecture: i386
Machine: i386
>Description:
Recent versions of cd(4) don't allow all of a DVD to be read.
However, programs using libdvdread don't seem to have a problem.
>How-To-Repeat:
Obtain a DVD larger than 400000 (2k) sectors.
Then try to read beyond 400000 sectors, on both a 3.x
series kernel, and a 4.0_BETA kernel.
If it makes a difference my DVD drive is:
<HL-DT-STCD-RW/DVD DRIVE GCC-4243N, , 1.08>
>Fix:
Perhaps revert whatever change broke this.
>Release-Note:
>Audit-Trail:
From: Michael van Elst <mlelstv@serpens.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/34688: cd(4) regression
Date: Sun, 8 Oct 2006 09:31:28 +0200
Can you please try this patch?
Index: cd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/scsipi/cd.c,v
retrieving revision 1.250
diff -u -r1.250 cd.c
--- cd.c 8 Sep 2006 00:33:18 -0000 1.250
+++ cd.c 8 Oct 2006 07:27:14 -0000
@@ -1711,7 +1711,9 @@
track_start = _4btol(ti.track_start);
track_size = _4btol(ti.track_size);
- *size = track_start + track_size;
+ /* overwrite only with a sane value */
+ if (track_start + track_size >= 100)
+ *size = track_start + track_size;
};
};
--
Michael van Elst
Internet: mlelstv@serpens.de
"A potential Snark may lurk in every tree."
Responsible-Changed-From-To: kern-bug-people->mlelstv
Responsible-Changed-By: mlelstv@netbsd.org
Responsible-Changed-When: Sun, 08 Oct 2006 07:38:52 +0000
Responsible-Changed-Why:
I do it
From: Michael van Elst <mlelstv@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/34688 CVS commit: src/sys/dev/scsipi
Date: Sun, 8 Oct 2006 07:50:16 +0000 (UTC)
Module Name: src
Committed By: mlelstv
Date: Sun Oct 8 07:50:16 UTC 2006
Modified Files:
src/sys/dev/scsipi: cd.c
Log Message:
Use last track info only if it gives a sane value. Fixes PR#34688.
To generate a diff of this commit:
cvs rdiff -r1.250 -r1.251 src/sys/dev/scsipi/cd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: mlelstv@netbsd.org
State-Changed-When: Sun, 08 Oct 2006 07:54:29 +0000
State-Changed-Why:
submitter confirms that this fixes the problem.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.