Author: marius
Date: Tue Jun 20 19:59:57 2017
New Revision: 320168
URL: https://svnweb.freebsd.org/changeset/base/320168

Log:
  The GEOM KPI in stable/10 requires Giant to be unacquired (a requirement
  dropped in r300287). So wrap calling into GEOM in {DROP,PICKUP}_GIANT(),
  similar to what as been done prio to r300288. This fixes a "Giant owned"
  panic with r318159 in place and INVARIANTS enabled.
  Reported by: Oliver Pinter

Modified:
  stable/10/sys/geom/geom_flashmap.c

Modified: stable/10/sys/geom/geom_flashmap.c
==============================================================================
--- stable/10/sys/geom/geom_flashmap.c  Tue Jun 20 19:45:02 2017        
(r320167)
+++ stable/10/sys/geom/geom_flashmap.c  Tue Jun 20 19:59:57 2017        
(r320168)
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/malloc.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
+#include <sys/proc.h>
 #include <sys/slicer.h>
 
 #include <geom/geom.h>
@@ -230,10 +231,12 @@ g_flashmap_load(device_t dev, struct g_provider *pp, f
 void flash_register_slicer(flash_slicer_t slicer, u_int type, bool force)
 {
 
+       DROP_GIANT();
        g_topology_lock();
        if (g_flashmap_slicers[type].slicer == NULL || force == TRUE)
                g_flashmap_slicers[type].slicer = slicer;
        g_topology_unlock();
+       PICKUP_GIANT();
 }
 
 static struct g_class g_flashmap_class = {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "[email protected]"

Reply via email to