Ensure that "domain" is initialized when vm_ndomains == 1.

Reported by:	alc
Approved by:	re (gjb)
This commit is contained in:
Mark Johnston 2018-09-24 15:32:46 +00:00
parent 2417a95e02
commit 3d14a7bb43

View File

@ -505,8 +505,10 @@ kmem_back(vm_object_t object, vm_offset_t addr, vm_size_t size, int flags)
next = roundup2(addr + 1, KVA_QUANTUM);
if (next > end || next < start)
next = end;
} else
} else {
domain = 0;
next = end;
}
rv = kmem_back_domain(domain, object, addr, next - addr, flags);
if (rv != KERN_SUCCESS) {
kmem_unback(object, start, addr - start);