Date: Sat, 21 Aug 1999 00:26:29 -0700 (PDT) From: "Brian F. Feldman" <green@FreeBSD.org> To: Poul-Henning Kamp <phk@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_physio.c Message-ID: <Pine.BSF.4.10.9908210025480.55604-100000@freefall.freebsd.org> In-Reply-To: <199908210648.XAA54012@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 20 Aug 1999, Poul-Henning Kamp wrote:
> phk 1999/08/20 23:48:17 PDT
>
> Modified files:
> sys/kern kern_physio.c
> Log:
> Detect if the the offset used to read from a raw device loose bits
> when converted to block number.
>
> Revision Changes Path
> 1.37 +8 -2 src/sys/kern/kern_physio.c
- bp->b_blkno = btodb(uio->uio_offset);
+ blockno = uio->uio_offset >> DEV_BSHIFT;
+ bp->b_blkno = blockno;
+ if (bp->b_blkno != blockno) {
^- How can this comparison ever fail?
+ error = EINVAL;
+ goto doerror;
+ }
--
Brian Fundakowski Feldman / "Any sufficiently advanced bug is \
green@FreeBSD.org | indistinguishable from a feature." |
FreeBSD: The Power to Serve! \ -- Rich Kulawiec /
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9908210025480.55604-100000>
