summaryrefslogtreecommitdiffstats
path: root/sys/vm/uma_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r--sys/vm/uma_core.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 47daeee..1ec706a 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1811,6 +1811,21 @@ zfree_start:
zfree_internal:
+#ifdef INVARIANTS
+ /*
+ * If we need to skip the dtor and the uma_dbg_free in uma_zfree_internal
+ * because we've already called the dtor above, but we ended up here, then
+ * we need to make sure that we take care of the uma_dbg_free immediately.
+ */
+ if (skip) {
+ ZONE_LOCK(zone);
+ if (zone->uz_flags & UMA_ZFLAG_MALLOC)
+ uma_dbg_free(zone, udata, item);
+ else
+ uma_dbg_free(zone, NULL, item);
+ ZONE_UNLOCK(zone);
+ }
+#endif
uma_zfree_internal(zone, item, udata, skip);
return;
OpenPOWER on IntegriCloud