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. PR: kern/162997
This commit is contained in:
parent
2c418c0083
commit
a2fa37fe67
@ -169,8 +169,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user