Author: avos Date: Thu Jan 31 11:36:28 2019 New Revision: 343605 URL: https://svnweb.freebsd.org/changeset/base/343605
Log: MFC r343473: geom_uzip(4): move NULL pointer KASSERT check before it is dereferenced PR: 203499 Submitted by: <ch...@triularity.org> MFC r343475: geom_uzip(4): set 'gp != NULL' assertion on top of the function There was yet another access to this variable in g_trace() few lines upper. PR: 203499 Reported by: cem Modified: stable/10/sys/geom/uzip/g_uzip.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/geom/uzip/g_uzip.c stable/12/sys/geom/uzip/g_uzip.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/geom/uzip/g_uzip.c ============================================================================== --- stable/10/sys/geom/uzip/g_uzip.c Thu Jan 31 11:12:31 2019 (r343604) +++ stable/10/sys/geom/uzip/g_uzip.c Thu Jan 31 11:36:28 2019 (r343605) @@ -864,6 +864,7 @@ g_uzip_destroy_geom(struct gctl_req *req, struct g_cla { struct g_provider *pp; + KASSERT(gp != NULL, ("NULL geom")); g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, gp->name); g_topology_assert(); @@ -873,7 +874,6 @@ g_uzip_destroy_geom(struct gctl_req *req, struct g_cla return (ENXIO); } - KASSERT(gp != NULL, ("NULL geom")); pp = LIST_FIRST(&gp->provider); KASSERT(pp != NULL, ("NULL provider")); if (pp->acr > 0 || pp->acw > 0 || pp->ace > 0) _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"