diff options
author | alc <alc@FreeBSD.org> | 2015-09-27 05:45:16 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2015-09-27 05:45:16 +0000 |
commit | cf3ae903933f5022590afe255d33fc7244e683d2 (patch) | |
tree | 915897d8cc5a74fafbc57d02817b57c7f1d12d59 /sys | |
parent | 49ac252d0773872b42ae5f72caef94e70b4ab44b (diff) | |
download | FreeBSD-src-cf3ae903933f5022590afe255d33fc7244e683d2.zip FreeBSD-src-cf3ae903933f5022590afe255d33fc7244e683d2.tar.gz |
MFC r266588
There is no reason to perform the pmap_remove() on the kernel pmap while
the kmem object lock is held. Do the pmap_remove() before acquiring the
kmem object lock.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_kern.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index b97b954..edfcf7a 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -396,9 +396,9 @@ kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size) KASSERT(object == kmem_object || object == kernel_object, ("kmem_unback: only supports kernel objects.")); + pmap_remove(kernel_pmap, addr, addr + size); offset = addr - VM_MIN_KERNEL_ADDRESS; VM_OBJECT_WLOCK(object); - pmap_remove(kernel_pmap, addr, addr + size); for (i = 0; i < size; i += PAGE_SIZE) { m = vm_page_lookup(object, OFF_TO_IDX(offset + i)); vm_page_unwire(m, 0); |