Author: markj
Date: Tue Aug 18 14:09:49 2020
New Revision: 364345
URL: https://svnweb.freebsd.org/changeset/base/364345

Log:
  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

Modified:
  head/sys/kern/kern_malloc.c
  head/sys/vm/uma_core.c

Modified: head/sys/kern/kern_malloc.c
==============================================================================
--- head/sys/kern/kern_malloc.c Tue Aug 18 12:14:01 2020        (r364344)
+++ head/sys/kern/kern_malloc.c Tue Aug 18 14:09:49 2020        (r364345)
@@ -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)

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c      Tue Aug 18 12:14:01 2020        (r364344)
+++ head/sys/vm/uma_core.c      Tue Aug 18 14:09:49 2020        (r364345)
@@ -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;
 
@@ -3354,9 +3351,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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to