Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jan 2000 04:10:02 -0800 (PST)
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/15956: Off-by-1 error in diskstrategy() triggers bug in ATA
Message-ID:  <200001071210.EAA13523@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/15956; it has been noted by GNATS.

From: Poul-Henning Kamp <phk@critter.freebsd.dk>
To: peter.jeremy@alcatel.com.au
Cc: freefall-gnats@gsmx07.alcatel.com.au
Subject: Re: kern/15956: Off-by-1 error in diskstrategy() triggers bug in ATA
Date: Fri, 7 Jan 2000 22:57:35 +1100

 In message <00Jan7.095115est.40327@border.alcanet.com.au>, peter.jeremy@alcatel
 .com.au writes:
 
 >Index: subr_disk.c
 >===================================================================
 >RCS file: /home/CVSROOT/src/sys/kern/subr_disk.c,v
 >retrieving revision 1.16
 >diff -u -r1.16 subr_disk.c
 >--- subr_disk.c	1999/12/19 12:36:41	1.16
 >+++ subr_disk.c	2000/01/06 21:39:34
 >@@ -193,7 +193,7 @@
 > 		return;
 > 	}
 > 
 >-	if (dscheck(bp, dp->d_slice) < 0) {
 >+	if (dscheck(bp, dp->d_slice) <= 0) {
 > 		biodone(bp);
 > 		return;
 > 	}
 >
 >	2) Add belt-and-braces checks to ATA device (this code compiles
 >	   and links, but I haven't booted from the resultant kernel):
 
 This was actually done that way deliberately, but not for any
 specific reason.
 
 Input welcome...
 
 --
 Poul-Henning Kamp             FreeBSD coreteam member
 phk@FreeBSD.ORG               "Real hackers run -current on their laptop."
 FreeBSD -- It will take a long time before progress goes too far!
 


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?200001071210.EAA13523>