Deny invalid I/O requests which comes from userland here, because later we'll get a panic. Index: geom_dev.c =================================================================== RCS file: /private/FreeBSD/src/sys/geom/geom_dev.c,v retrieving revision 1.79 diff -u -p -r1.79 geom_dev.c --- geom_dev.c 8 Aug 2004 07:57:51 -0000 1.79 +++ geom_dev.c 14 Oct 2004 19:35:05 -0000 @@ -345,6 +345,12 @@ g_dev_strategy(struct bio *bp) KASSERT(cp->acr || cp->acw, ("Consumer with zero access count in g_dev_strategy")); + if ((bp->bio_offset % cp->provider->sectorsize) != 0 || + (bp->bio_bcount % cp->provider->sectorsize) != 0) { + biofinish(bp, NULL, EINVAL); + return; + } + for (;;) { /* * XXX: This is not an ideal solution, but I belive it to