From owner-freebsd-current Thu Dec 19 10:15:23 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5651237B401; Thu, 19 Dec 2002 10:15:21 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 036CA43ED1; Thu, 19 Dec 2002 10:15:21 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.5) with ESMTP id gBJIFKOM072832; Thu, 19 Dec 2002 10:15:20 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.5/Submit) id gBJIFKwe072831; Thu, 19 Dec 2002 10:15:20 -0800 (PST) (envelope-from dillon) Date: Thu, 19 Dec 2002 10:15:20 -0800 (PST) From: Matthew Dillon Message-Id: <200212191815.gBJIFKwe072831@apollo.backplane.com> To: Poul-Henning Kamp Cc: current@FreeBSD.ORG Subject: Re: [src] cvs commit: src/sys/geom geom_dev.c References: <20021213220448.0BB0737B423@hub.freebsd.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This commit is crashing my -current box on boot when it goes to check for a core. I get the panic: "Negative bio_offset (-1024) on bio ..." Userland probably should not be allowed to panic the box in that way. -Matt Matthew Dillon : :phk 2002/12/13 14:04:45 PST : : Modified files: : sys/geom geom_dev.c : Log: : Add a couple of KASSERTS, just in case. : : Revision Changes Path : 1.33 +4 -0 src/sys/geom/geom_dev.c : : :Index: src/sys/geom/geom_dev.c :diff -u src/sys/geom/geom_dev.c:1.32 src/sys/geom/geom_dev.c:1.33 :--- src/sys/geom/geom_dev.c:1.32 Fri Nov 1 07:56:26 2002 :+++ src/sys/geom/geom_dev.c Fri Dec 13 14:04:45 2002 :@@ -32,7 +32,7 @@ : * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF : * SUCH DAMAGE. : * :- * $FreeBSD: /repoman/r/ncvs/src/sys/geom/geom_dev.c,v 1.32 2002/11/01 15:56:26 phk Exp $ :+ * $FreeBSD: /repoman/r/ncvs/src/sys/geom/geom_dev.c,v 1.33 2002/12/13 22:04:45 phk Exp $ : */ : : #include :@@ -388,7 +388,11 @@ : gp = dev->si_drv1; : cp = dev->si_drv2; : bp2 = g_clone_bio(bp); :+ KASSERT(bp2 != NULL, ("XXX: ENOMEM in a bad place")); : bp2->bio_offset = (off_t)bp->bio_blkno << DEV_BSHIFT; :+ KASSERT(bp2->bio_offset >= 0, :+ ("Negative bio_offset (%jd) on bio %p", :+ (intmax_t)bp2->bio_offset, bp)); : bp2->bio_length = (off_t)bp->bio_bcount; : bp2->bio_done = g_dev_done; : g_trace(G_T_BIO, : To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message