Date: Thu, 14 Jun 2007 18:04:12 GMT From: Ulf Lilleengen <lulf@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 121644 for review Message-ID: <200706141804.l5EI4CpR071132@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=121644 Change 121644 by lulf@lulf_carrot on 2007/06/14 18:03:54 - Make sure we NULL out the last_read_plex so we don't get a panic after a detach and a volume tries to read. - Fix a memory leak where I forgot to set the GV_BIO_MALLOC flag. Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_subr.c#8 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_volume.c#5 edit Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_subr.c#8 (text+ko) ==== @@ -1155,6 +1155,8 @@ return (GV_ERR_ISOPEN); } v->plexcount--; + /* Make sure someone don't read us when gone. */ + v->last_read_plex = NULL; LIST_REMOVE(p, in_volume); p->vol_sc = NULL; memset(p->volume, 0, GV_MAXVOLNAME); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_volume.c#5 (text+ko) ==== @@ -242,10 +242,9 @@ bp->bio_offset = offset; bp->bio_caller2 = to; bp->bio_cmd = type; - if (data == NULL) { + if (data == NULL) data = g_malloc(length, M_WAITOK); - bp->bio_cflags |= GV_BIO_MALLOC; - } + bp->bio_cflags |= GV_BIO_MALLOC; /* Free on the next run. */ bp->bio_data = data; /* printf("Sending next bio:\n ");help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706141804.l5EI4CpR071132>
