Date: Tue, 28 Sep 2004 14:51:24 +0100 From: David Malone <dwmalone@maths.tcd.ie> To: Matthias Andree <matthias.andree@gmx.de> Cc: current@freebsd.org Subject: Re: FreeBSD 5.3-BETA6 available Message-ID: <200409281451.aa67359@salmon.maths.tcd.ie> In-Reply-To: Your message of "Tue, 28 Sep 2004 15:14:08 %2B0200." <20040928131408.GA6887@merlin.emma.line.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> > Bruce suggests that this one is fixed in geom, which is now used
> > by default. If this is the case, I can close the PR.
> Please do not close the PR yet, the bug persists in FreeBSD
> 4.10-RELEASE-p3 (tested a few minutes ago) and probably also in 4.8.
Here's a quick attempt to port the patch that Bruce suggested. I
haven't been able to test it yet, but you might like to try it.
David.
--- /usr/src/sys/kern/subr_diskslice.c Fri Sep 7 21:45:00 2001
+++ subr_diskslice.c Tue Sep 28 14:47:39 2004
@@ -142,6 +142,7 @@
struct disklabel *lp;
char *msg;
long nsec;
+ off_t offset;
struct partition *pp;
daddr_t secno;
daddr_t slicerel_secno;
@@ -153,6 +154,20 @@
printf("dscheck(%s): negative b_blkno %ld\n",
devtoname(bp->b_dev), (long)blkno);
bp->b_error = EINVAL;
+ goto bad;
+ }
+ offset = bp->b_offset;
+ if (offset < 0) {
+ printf("dscheck(%s): negative b_offset %ld\n",
+ devtoname(bp->b_dev), (long)offset);
+ bp->b_error = EINVAL;
+ goto bad;
+ }
+ if (offset % (uoff_t)DEV_BSIZE) {
+ printf(
+ "dscheck(%s): b_offset %ld is not on a DEV_BSIZE boundary\n",
+ devtoname(bp->b_dev), (long)offset);
+ bp->bio_error = EINVAL;
goto bad;
}
sp = &ssp->dss_slices[dkslice(bp->b_dev)];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409281451.aa67359>
