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 
                                        <[EMAIL PROTECTED]>

:
: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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to