Date: Mon, 20 Aug 2012 16:13:16 +0000 (UTC) From: Jim Harris <jimharris@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r239442 - stable/8/sys/geom/virstor Message-ID: <201208201613.q7KGDG0q059647@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jimharris Date: Mon Aug 20 16:13:16 2012 New Revision: 239442 URL: http://svn.freebsd.org/changeset/base/239442 Log: MRC r239021: In virstor_ctl_stop(), check for a valid softc before trying to update metadata. Modified: stable/8/sys/geom/virstor/g_virstor.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/8/sys/geom/virstor/g_virstor.c Mon Aug 20 16:11:13 2012 (r239441) +++ stable/8/sys/geom/virstor/g_virstor.c Mon Aug 20 16:13:16 2012 (r239442) @@ -231,6 +231,12 @@ virstor_ctl_stop(struct gctl_req *req, s return; } sc = virstor_find_geom(cp, name); + if (sc == NULL) { + gctl_error(req, "Don't know anything about '%s'", name); + g_topology_unlock(); + return; + } + LOG_MSG(LVL_INFO, "Stopping %s by the userland command", sc->geom->name); update_metadata(sc);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208201613.q7KGDG0q059647>