| Summary: | [geom][panic] panic when committing undone partitioning with BSD slice | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Rebecca Cran <bcran> |
| Component: | kern | Assignee: | Andrey V. Elsukov <ae> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Rebecca Cran
2010-07-16 19:20:06 UTC
"gpart show" also segfaults after running the "undo" because it appears not
all fields were cleared. The crash occurs in geom/class/part/geom_part.c:530
when NULL is passed to strtoimax; 'gp' contains:
{ lg_id = 0xffffff001d441200, lg_class = 0x801045460,
lg_name = 0x8010190b8 "da0", lg_rank = 2, lg_geom = {le_next = 0x801046bf0,
le_prev = 0x801046d50}, lg_consumer = {lh_first = 0x801046ce0},
lg_provider = {lh_first = 0x801032380}, lg_config = {lh_first = 0x0}}
Responsible Changed From-To: freebsd-bugs->freebsd-geom Over to maintainer(s). Responsible Changed From-To: freebsd-geom->ae Take. This is a multi-part message in MIME format. State Changed From-To: open->feedback feedback requested. On Mon, Jul 19, 2010 at 09:29:02AM +0400, Andrey V. Elsukov wrote:
> can you test following patch?
Thanks, the patch fixes the problem.
--
Bruce Cran
Author: ae Date: Mon Aug 2 10:26:15 2010 New Revision: 210746 URL: http://svn.freebsd.org/changeset/base/210746 Log: Release access for consumers that are opened, but will be destroyed indirectly by orphan method. PR: 148688 Silence from: marcel Approved by: mav (mentor) MFC after: 2 weeks Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Mon Aug 2 09:13:09 2010 (r210745) +++ head/sys/geom/part/g_part.c Mon Aug 2 10:26:15 2010 (r210746) @@ -1739,6 +1739,7 @@ static void g_part_orphan(struct g_consumer *cp) { struct g_provider *pp; + struct g_part_table *table; pp = cp->provider; KASSERT(pp != NULL, (__func__)); @@ -1746,6 +1747,9 @@ g_part_orphan(struct g_consumer *cp) g_topology_assert(); KASSERT(pp->error != 0, (__func__)); + table = cp->geom->softc; + if (table->gpt_opened) + g_access(cp, -1, -1, -1); g_part_wither(cp->geom, pp->error); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: feedback->patched Patched in head/. Author: ae Date: Mon Aug 16 08:48:39 2010 New Revision: 211390 URL: http://svn.freebsd.org/changeset/base/211390 Log: MFC r210746: Release access for consumers that are opened, but will be destroyed indirectly by orphan method. PR: 148688 MFC r210792: Check that table is not NULL before access, it can be NULL for some cases. Approved by: kib (mentor) Modified: stable/8/sys/geom/part/g_part.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cam/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/part/g_part.c ============================================================================== --- stable/8/sys/geom/part/g_part.c Mon Aug 16 04:22:29 2010 (r211389) +++ stable/8/sys/geom/part/g_part.c Mon Aug 16 08:48:39 2010 (r211390) @@ -1738,6 +1738,7 @@ static void g_part_orphan(struct g_consumer *cp) { struct g_provider *pp; + struct g_part_table *table; pp = cp->provider; KASSERT(pp != NULL, (__func__)); @@ -1745,6 +1746,9 @@ g_part_orphan(struct g_consumer *cp) g_topology_assert(); KASSERT(pp->error != 0, (__func__)); + table = cp->geom->softc; + if (table != NULL && table->gpt_opened) + g_access(cp, -1, -1, -1); g_part_wither(cp->geom, pp->error); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: patched->closed Merged to stable/8. |