From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 16:11:14 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7AD2A1065700; Mon, 20 Aug 2012 16:11:14 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 644AC8FC0C; Mon, 20 Aug 2012 16:11:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KGBEu7059381; Mon, 20 Aug 2012 16:11:14 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KGBEve059379; Mon, 20 Aug 2012 16:11:14 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201208201611.q7KGBEve059379@svn.freebsd.org> From: Jim Harris Date: Mon, 20 Aug 2012 16:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239441 - stable/9/sys/geom/virstor X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 16:11:14 -0000 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);