summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2002-05-20 17:54:48 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2002-05-20 17:54:48 +0000
commit4c1cc01cd834034963247faeea45682458da9924 (patch)
tree3fdfe9d4e79dbfc11db77e36b1668b792f25db1c
parentbbd296aba68c2b9c8f61eb3e896d78739109b6bf (diff)
Notes
-rw-r--r--sys/vm/uma_core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index df7966828980..c6924b0b7080 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -66,6 +66,7 @@
#include <sys/lock.h>
#include <sys/sysctl.h>
#include <sys/mutex.h>
+#include <sys/proc.h>
#include <sys/smp.h>
#include <sys/vmmeter.h>
@@ -1317,6 +1318,12 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags)
printf("Allocating one item from %s(%p)\n", zone->uz_name, zone);
#endif
+ if (!(flags & M_NOWAIT)) {
+ KASSERT(curthread->td_intr_nesting_level == 0,
+ ("malloc(M_WAITOK) in interrupt context"));
+ WITNESS_SLEEP(1, NULL);
+ }
+
zalloc_restart:
cpu = PCPU_GET(cpuid);
CPU_LOCK(zone, cpu);