summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>2012-06-27 16:05:09 +0000
committerken <ken@FreeBSD.org>2012-06-27 16:05:09 +0000
commitb81d46dab2b17e64bc1a7a01499de1d2756f4f9b (patch)
tree84fbdf74a88fa75cf5a516b3c02f8d13ba2dea87 /sys/geom
parent94f926381b2fb51be70183f9b9ef9c5130c65561 (diff)
downloadFreeBSD-src-b81d46dab2b17e64bc1a7a01499de1d2756f4f9b.zip
FreeBSD-src-b81d46dab2b17e64bc1a7a01499de1d2756f4f9b.tar.gz
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@protected-networks.net> MFC after: 3 days
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_disk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index e0f2bc1..7706517 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -502,6 +502,14 @@ g_disk_providergone(struct g_provider *pp)
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)
OpenPOWER on IntegriCloud