svn commit: r328947 - stable/11/sys/geom/journal

Kirk McKusick mckusick at FreeBSD.org
Tue Feb 6 19:17:06 UTC 2018


Author: mckusick
Date: Tue Feb  6 19:17:05 2018
New Revision: 328947
URL: https://svnweb.freebsd.org/changeset/base/328947

Log:
  MFC of 328647.
  
  avoid segment fault in g_journal

Modified:
  stable/11/sys/geom/journal/g_journal.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/geom/journal/g_journal.c
==============================================================================
--- stable/11/sys/geom/journal/g_journal.c	Tue Feb  6 19:14:53 2018	(r328946)
+++ stable/11/sys/geom/journal/g_journal.c	Tue Feb  6 19:17:05 2018	(r328947)
@@ -2430,6 +2430,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);
@@ -2441,7 +2442,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-all mailing list