Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2002 10:15:20 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Poul-Henning Kamp <phk@FreeBSD.ORG>
Cc:        current@FreeBSD.ORG
Subject:   Re: [src] cvs commit: src/sys/geom geom_dev.c
Message-ID:  <200212191815.gBJIFKwe072831@apollo.backplane.com>
References:   <20021213220448.0BB0737B423@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
    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 
					<dillon@backplane.com>

:
: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 <sys/param.h>
:@@ -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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212191815.gBJIFKwe072831>