Date: Wed, 31 Jan 2018 23:30:49 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328647 - head/sys/geom/journal Message-ID: <201801312330.w0VNUnbm002823@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801312330.w0VNUnbm002823>