Date: Fri, 7 Jan 2000 13:17:51 +0100 (CET) From: Soren Schmidt <sos@freebsd.dk> To: phk@critter.freebsd.dk (Poul-Henning Kamp) Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/15956: Off-by-1 error in diskstrategy() triggers bug in ATA Message-ID: <200001071217.NAA83738@freebsd.dk> In-Reply-To: <200001071210.EAA13523@freefall.freebsd.org> from Poul-Henning Kamp at "Jan 7, 2000 04:10:02 am"
next in thread | previous in thread | raw e-mail | index | archive | help
It seems Poul-Henning Kamp wrote: > >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... I've put this in the ata drivers: /* if it's a null transfer, return immediatly. */ if (bp->b_bcount == 0) { bp->b_resid = 0; biodone(bp); return; } -Søren 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?200001071217.NAA83738>