Date: Mon, 20 Aug 2012 16:11:14 +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-9@freebsd.org Subject: svn commit: r239441 - stable/9/sys/geom/virstor Message-ID: <201208201611.q7KGBEve059379@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jimharris Date: Mon Aug 20 16:11:13 2012 New Revision: 239441 URL: http://svn.freebsd.org/changeset/base/239441 Log: MFC r239021: In virstor_ctl_stop(), check for a valid softc before trying to update metadata. Modified: stable/9/sys/geom/virstor/g_virstor.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/9/sys/geom/virstor/g_virstor.c Mon Aug 20 16:00:33 2012 (r239440) +++ stable/9/sys/geom/virstor/g_virstor.c Mon Aug 20 16:11:13 2012 (r239441) @@ -234,6 +234,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?201208201611.q7KGBEve059379>