From owner-svn-src-all@freebsd.org Tue Feb 6 19:17:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7842BEF4832; Tue, 6 Feb 2018 19:17:41 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B9447AC97; Tue, 6 Feb 2018 19:17:41 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 268881C191; Tue, 6 Feb 2018 19:17:41 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w16JHfAa047886; Tue, 6 Feb 2018 19:17:41 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w16JHf0t047885; Tue, 6 Feb 2018 19:17:41 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201802061917.w16JHf0t047885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 6 Feb 2018 19:17:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r328948 - stable/10/sys/geom/journal X-SVN-Group: stable-10 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/10/sys/geom/journal X-SVN-Commit-Revision: 328948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2018 19:17:41 -0000 Author: mckusick Date: Tue Feb 6 19:17:40 2018 New Revision: 328948 URL: https://svnweb.freebsd.org/changeset/base/328948 Log: MFC of 328647. avoid segment fault in g_journal Modified: stable/10/sys/geom/journal/g_journal.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/journal/g_journal.c ============================================================================== --- stable/10/sys/geom/journal/g_journal.c Tue Feb 6 19:17:05 2018 (r328947) +++ stable/10/sys/geom/journal/g_journal.c Tue Feb 6 19:17:40 2018 (r328948) @@ -2433,6 +2433,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); @@ -2444,7 +2445,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);