From b21b022a818ad5218f54e5d1045bd75e03b9de27 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 18 Aug 2020 14:09:49 +0000 Subject: [PATCH] Revert r364310. Some of the resulting fallout in CAM does not appear straightforward to fix, so simply revert the commit for now in the absence of a better solution. Discussed with: mjg Reported by: dhw --- sys/kern/kern_malloc.c | 3 --- sys/vm/uma_core.c | 6 ------ 2 files changed, 9 deletions(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 46eb1c4347c5..300a1692e7df 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -618,9 +618,6 @@ void * unsigned long osize = size; #endif - KASSERT((flags & M_WAITOK) == 0 || THREAD_CAN_SLEEP(), - ("malloc(M_WAITOK) in non-sleepable context")); - #ifdef MALLOC_DEBUG va = NULL; if (malloc_dbg(&va, &size, mtp, flags) != 0) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 37d783542007..9d0786c1d754 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -3328,9 +3328,6 @@ uma_zalloc_smr(uma_zone_t zone, int flags) uma_cache_bucket_t bucket; uma_cache_t cache; - KASSERT((flags & M_WAITOK) == 0 || THREAD_CAN_SLEEP(), - ("uma_zalloc_smr(M_WAITOK) in non-sleepable context")); - #ifdef UMA_ZALLOC_DEBUG void *item; @@ -3355,9 +3352,6 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags) uma_cache_bucket_t bucket; uma_cache_t cache; - KASSERT((flags & M_WAITOK) == 0 || THREAD_CAN_SLEEP(), - ("uma_zalloc(M_WAITOK) in non-sleepable context")); - /* Enable entropy collection for RANDOM_ENABLE_UMA kernel option */ random_harvest_fast_uma(&zone, sizeof(zone), RANDOM_UMA);