Index: sys/vm/vm_domainset.c =================================================================== --- sys/vm/vm_domainset.c +++ sys/vm/vm_domainset.c @@ -262,8 +262,11 @@ int *flags) { - di->di_flags = *flags; - *flags = (di->di_flags & ~M_WAITOK) | M_NOWAIT; + if (flags != NULL) { + di->di_flags = *flags; + *flags = (di->di_flags & ~M_WAITOK) | M_NOWAIT; + } else + di->di_flags = M_NOWAIT; vm_domainset_iter_first(di, domain); if (vm_page_count_min_domain(*domain)) vm_domainset_iter_policy(di, domain); Index: sys/vm/vm_kern.c =================================================================== --- sys/vm/vm_kern.c +++ sys/vm/vm_kern.c @@ -266,7 +266,7 @@ vm_offset_t addr; int domain; - vm_domainset_iter_policy_init(&di, ds, &domain, &flags); + vm_domainset_iter_policy_init(&di, ds, &domain, NULL); do { addr = kmem_alloc_attr_domain(domain, size, flags, low, high, memattr); @@ -348,7 +348,7 @@ vm_offset_t addr; int domain; - vm_domainset_iter_policy_init(&di, ds, &domain, &flags); + vm_domainset_iter_policy_init(&di, ds, &domain, NULL); do { addr = kmem_alloc_contig_domain(domain, size, flags, low, high, alignment, boundary, memattr);