Author: ken Date: Wed Jun 27 16:05:09 2012 New Revision: 237648 URL: http://svn.freebsd.org/changeset/base/237648
Log: In g_disk_providergone(), don't continue if the softc is NULL. This may be the case if we've already gone through g_disk_destroy(). Reported by: Michael Butler <i...@protected-networks.net> MFC after: 3 days Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Wed Jun 27 15:55:34 2012 (r237647) +++ head/sys/geom/geom_disk.c Wed Jun 27 16:05:09 2012 (r237648) @@ -502,6 +502,14 @@ g_disk_providergone(struct g_provider *p struct g_disk_softc *sc; sc = (struct g_disk_softc *)pp->geom->softc; + + /* + * If the softc is already NULL, then we've probably been through + * g_disk_destroy already; there is nothing for us to do anyway. + */ + if (sc == NULL) + return; + dp = sc->dp; if (dp->d_gone != NULL) _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"