aboutsummaryrefslogtreecommitdiff
path: root/sys/geom
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2018-01-31 23:30:49 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2018-01-31 23:30:49 +0000
commit5d84ae8b49404b808246993a101aa728b897a14f (patch)
tree570e54e1289f2f47ad39b6f65e5750f796cf10a6 /sys/geom
parent1f0e303c4741a9c2a0abd784db27ac6b1afb6570 (diff)
downloadsrc-5d84ae8b49404b808246993a101aa728b897a14f.tar.gz
src-5d84ae8b49404b808246993a101aa728b897a14f.zip
Null out journal softc pointer earlier to avoid a segment fault
that can otherwise occur. PR: 221804 Submitted by: Andreas Longwitz <longwitz at incore.de> MFC after: 1 week
Notes
Notes: svn path=/head/; revision=328647
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/journal/g_journal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/journal/g_journal.c b/sys/geom/journal/g_journal.c
index b7ba745888c8..bdfad253b67c 100644
--- a/sys/geom/journal/g_journal.c
+++ b/sys/geom/journal/g_journal.c
@@ -2432,6 +2432,7 @@ g_journal_destroy(struct g_journal_softc *sc)
sc->sc_current_count);
}
+ gp->softc = NULL;
LIST_FOREACH(cp, &gp->consumer, consumer) {
if (cp->acr + cp->acw + cp->ace > 0)
g_access(cp, -1, -1, -1);
@@ -2443,7 +2444,6 @@ g_journal_destroy(struct g_journal_softc *sc)
*/
g_post_event(g_journal_destroy_consumer, cp, M_WAITOK, NULL);
}
- gp->softc = NULL;
g_wither_geom(gp, ENXIO);
free(sc, M_JOURNAL);
return (0);