svn commit: r249147 - stable/9/sys/geom
Alexander Motin
mav at FreeBSD.org
Fri Apr 5 10:30:38 UTC 2013
Author: mav
Date: Fri Apr 5 10:30:37 2013
New Revision: 249147
URL: http://svnweb.freebsd.org/changeset/base/249147
Log:
MFC r228204:
Close race between geom destruction on g_vfs_close() when softc destroyed
and g_vfs_orphan() call that tries to access softc, intruced at r227015.
Modified:
stable/9/sys/geom/geom_vfs.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/geom/geom_vfs.c
==============================================================================
--- stable/9/sys/geom/geom_vfs.c Fri Apr 5 10:29:14 2013 (r249146)
+++ stable/9/sys/geom/geom_vfs.c Fri Apr 5 10:30:37 2013 (r249147)
@@ -214,8 +214,10 @@ g_vfs_orphan(struct g_consumer *cp)
g_topology_assert();
gp = cp->geom;
- sc = gp->softc;
g_trace(G_T_TOPOLOGY, "g_vfs_orphan(%p(%s))", cp, gp->name);
+ sc = gp->softc;
+ if (sc == NULL)
+ return;
mtx_lock(&sc->sc_mtx);
sc->sc_orphaned = 1;
destroy = (sc->sc_active == 0);
More information about the svn-src-stable-9
mailing list