svn commit: r328647 - head/sys/geom/journal
Kirk McKusick
mckusick at FreeBSD.org
Wed Jan 31 23:30:50 UTC 2018
Author: mckusick
Date: Wed Jan 31 23:30:49 2018
New Revision: 328647
URL: https://svnweb.freebsd.org/changeset/base/328647
Log:
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
Modified:
head/sys/geom/journal/g_journal.c
Modified: head/sys/geom/journal/g_journal.c
==============================================================================
--- head/sys/geom/journal/g_journal.c Wed Jan 31 23:16:54 2018 (r328646)
+++ head/sys/geom/journal/g_journal.c Wed Jan 31 23:30:49 2018 (r328647)
@@ -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);
More information about the svn-src-head
mailing list