geom_virstor with kernel panic in FreeBSD 9.x

Jim Harris jimharris at freebsd.org
Fri Aug 3 16:49:42 UTC 2012


On Fri, Aug 3, 2012 at 5:06 AM, Marcelo Gondim <gondim at bsdinfo.com.br> wrote:
> Hi all,
>
> I sent a PR [1] but I decided to also send the problem here.
> If you try to destroy a geom_virstor that does not exist, this causes a
> kernel panic immediately.
>
> Just try:
>
> gvirstor load
> gvirstor destroy tatata
>
> # uname -a
> FreeBSD zeus.xxxx.xxx.br 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #27: Mon Jul
> 16 01:41:24 BRT 2012 root at zeus.xxxx.xxx.br:/usr/obj/usr/src/sys/GONDIM
> amd64
>
> [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=170199
>
> Best regards,
> Gondim
>

Hi Gondim,

Can you test the following patch?

Index: sys/geom/virstor/g_virstor.c
===================================================================
--- 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);

Thanks,

-Jim

>
>
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"


More information about the freebsd-stable mailing list