From owner-svn-src-head@freebsd.org Wed Feb 14 15:12:10 2018 Return-Path: Delivered-To: svn-src-head@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 16225F06011; Wed, 14 Feb 2018 15:12:10 +0000 (UTC) (envelope-from jhibbits@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 C08AA7CDC7; Wed, 14 Feb 2018 15:12:09 +0000 (UTC) (envelope-from jhibbits@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 BB84C117CC; Wed, 14 Feb 2018 15:12:09 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1EFC9EO049591; Wed, 14 Feb 2018 15:12:09 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1EFC9f1049589; Wed, 14 Feb 2018 15:12:09 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201802141512.w1EFC9f1049589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 14 Feb 2018 15:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329262 - head/sys/geom/part X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/geom/part X-SVN-Commit-Revision: 329262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Feb 2018 15:12:10 -0000 Author: jhibbits Date: Wed Feb 14 15:12:09 2018 New Revision: 329262 URL: https://svnweb.freebsd.org/changeset/base/329262 Log: Fix a panic introduced in r329225 Some GEOM partition tables may be destroyed with incomplete partition entries. Guard against this with NULL checks. Reported by: pholm,others Reviewed by: markj Tested by: pholm Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Wed Feb 14 14:29:11 2018 (r329261) +++ head/sys/geom/part/g_part.c Wed Feb 14 15:12:09 2018 (r329262) @@ -1549,9 +1549,11 @@ g_part_wither(struct g_geom *gp, int error) while ((entry = LIST_FIRST(&table->gpt_entry)) != NULL) { LIST_REMOVE(entry, gpe_entry); pp = entry->gpe_pp; - entry->gpe_pp->private = NULL; entry->gpe_pp = NULL; - g_wither_provider(pp, error); + if (pp != NULL) { + pp->private = NULL; + g_wither_provider(pp, error); + } g_free(entry); } G_PART_DESTROY(table, NULL);