From owner-freebsd-stable@FreeBSD.ORG Fri Aug 3 17:04:08 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEEDA1065670; Fri, 3 Aug 2012 17:04:08 +0000 (UTC) (envelope-from gondim@bsdinfo.com.br) Received: from zeus.linuxinfo.com.br (zeus.linuxinfo.com.br [186.193.48.13]) by mx1.freebsd.org (Postfix) with ESMTP id 6240E8FC0C; Fri, 3 Aug 2012 17:04:08 +0000 (UTC) Received: from zeus.linuxinfo.com.br (zeus.linuxinfo.com.br [127.0.0.1]) by zeus.linuxinfo.com.br (Postfix) with ESMTP id 93DE1466A46D; Fri, 3 Aug 2012 14:04:22 -0300 (BRT) X-Virus-Scanned: amavisd-new at zeus.linuxinfo.com.br Received: from zeus.linuxinfo.com.br ([127.0.0.1]) by zeus.linuxinfo.com.br (zeus.linuxinfo.com.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fegFh9-ggjPb; Fri, 3 Aug 2012 14:04:20 -0300 (BRT) Received: from [192.168.3.11] (unknown [186.193.48.8]) by zeus.linuxinfo.com.br (Postfix) with ESMTPSA id A449B466A452; Fri, 3 Aug 2012 14:04:19 -0300 (BRT) Message-ID: <501C0485.8070002@bsdinfo.com.br> Date: Fri, 03 Aug 2012 14:04:05 -0300 From: Marcelo Gondim User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Jim Harris References: <1977769407.20120322151934@tkachuk.name> <4F6B4030.5090907@FreeBSD.org> <4F6B4631.8020006@gmail.com> <4F6B4B93.7020309@FreeBSD.org> <4F6B4FAB.1020202@gmail.com> <1332434072.8403.79.camel@revolution.hippie.lan> <501B8004.1000503@ateamsystems.com> <501BBEBB.5010106@bsdinfo.com.br> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: geom_virstor with kernel panic in FreeBSD 9.x X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 17:04:08 -0000 Em 03/08/2012 13:49, Jim Harris escreveu: > =================================================================== > --- sys/geom/virstor/g_virstor.c (revision 238909) > +++ sys/geom/virstor/g_virstor.c (working copy) > @@ -235,6 +235,12 @@ > 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); Hi Jim, When I applied the patch gave this error: # patch < /root/patch.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- sys/geom/virstor/g_virstor.c (revision 238909) |+++ sys/geom/virstor/g_virstor.c (working copy) -------------------------- Patching file sys/geom/virstor/g_virstor.c using Plan A... Hunk #1 failed at 235. 1 out of 1 hunks failed--saving rejects to sys/geom/virstor/g_virstor.c.rej done # cat sys/geom/virstor/g_virstor.c.rej *************** *** 235,240 **** return; } sc = virstor_find_geom(cp, name); LOG_MSG(LVL_INFO, "Stopping %s by the userland command", sc->geom->name); update_metadata(sc); --- 235,246 ---- 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);