svn commit: r329262 - head/sys/geom/part
Justin Hibbits
jhibbits at FreeBSD.org
Wed Feb 14 15:12:10 UTC 2018
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);
More information about the svn-src-all
mailing list