summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-10-07 18:03:03 +0000
committeralc <alc@FreeBSD.org>2007-10-07 18:03:03 +0000
commit19c4fce2e39c325ffe0bd1b22f2f15e20514579f (patch)
tree6f69a336b07b412f05aaf3813afeec0a539f29ad /sys/vm
parent3faef0286022deb16a1b3270d26e8aeeb68434fe (diff)
downloadFreeBSD-src-19c4fce2e39c325ffe0bd1b22f2f15e20514579f.zip
FreeBSD-src-19c4fce2e39c325ffe0bd1b22f2f15e20514579f.tar.gz
Correct a lock assertion failure in sparc64's pmap_page_is_mapped() that is
a consequence of sparc64/sparc64/vm_machdep.c revision 1.76. It occurs when uma_small_free() frees a page. The solution has two parts: (1) Mark pages allocated with VM_ALLOC_NOOBJ as PG_UNMANAGED. (2) Defer the lock assertion in pmap_page_is_mapped() until after PG_UNMANAGED is tested. This is safe because both PG_UNMANAGED and PG_FICTITIOUS are immutable flags, i.e., they do not change state between the time that a page is allocated and freed. Approved by: re (kensmith) PR: 116794
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_page.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 87c892d..10fe984 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -1086,7 +1086,7 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req)
if (req & VM_ALLOC_ZERO)
flags = PG_ZERO;
}
- if (object != NULL && object->type == OBJT_PHYS)
+ if (object == NULL || object->type == OBJT_PHYS)
flags |= PG_UNMANAGED;
m->flags = flags;
if (req & (VM_ALLOC_NOBUSY | VM_ALLOC_NOOBJ))
OpenPOWER on IntegriCloud