svn commit: r239441 - stable/9/sys/geom/virstor

Jim Harris jimharris at FreeBSD.org
Mon Aug 20 16:11:14 UTC 2012


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);


More information about the svn-src-stable mailing list