aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom.h
diff options
context:
space:
mode:
authorJaakko Heinonen <jh@FreeBSD.org>2010-05-05 18:53:24 +0000
committerJaakko Heinonen <jh@FreeBSD.org>2010-05-05 18:53:24 +0000
commit9061251f9ac7d2b9be5cceb89d0611a92b10d22e (patch)
tree906c631de7ab5dc88ba8a8cbd804c21fdfef4d6f /sys/geom/geom.h
parentd75554ec0451b31e7a923b25314b703cd66929ff (diff)
downloadsrc-9061251f9ac7d2b9be5cceb89d0611a92b10d22e.tar.gz
src-9061251f9ac7d2b9be5cceb89d0611a92b10d22e.zip
Fix deadlock between GEOM class unloading and withering. Withering can't
proceed while g_unload_class() blocks the event thread. Fix this by not running g_unload_class() as a GEOM event and dropping the topology lock when withering needs to proceed. PR: kern/139847 Silence on: freebsd-geom
Notes
Notes: svn path=/head/; revision=207671
Diffstat (limited to 'sys/geom/geom.h')
-rw-r--r--sys/geom/geom.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h
index 82d04568aee1..fe18a15e8c60 100644
--- a/sys/geom/geom.h
+++ b/sys/geom/geom.h
@@ -353,6 +353,9 @@ g_free(void *ptr)
sx_assert(&topology_lock, SX_UNLOCKED); \
} while (0)
+#define g_topology_sleep(chan, timo) \
+ sx_sleep(chan, &topology_lock, 0, "gtopol", timo)
+
#define DECLARE_GEOM_CLASS(class, name) \
static moduledata_t name##_mod = { \
#name, g_modevent, &class \