mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 14:49:36 -04:00
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
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Reference in a new issue