svn commit: r237648 - head/sys/geom
Kenneth D. Merry
ken at FreeBSD.org
Wed Jun 27 16:05:10 UTC 2012
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 <imb at 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)
More information about the svn-src-head
mailing list