From owner-cvs-all Sat Aug 21 0:26:57 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id F2CA215446; Sat, 21 Aug 1999 00:26:49 -0700 (PDT) (envelope-from green@FreeBSD.org) Received: from localhost (green@localhost) by freefall.freebsd.org (8.9.3/8.9.2) with ESMTP id AAA55697; Sat, 21 Aug 1999 00:26:29 -0700 (PDT) (envelope-from green@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: green owned process doing -bs Date: Sat, 21 Aug 1999 00:26:29 -0700 (PDT) From: "Brian F. Feldman" To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_physio.c In-Reply-To: <199908210648.XAA54012@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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