From dc9250f55c1d6f219c5dcbd5dc8d933fe838232c Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 7 Oct 2007 18:03:03 +0000 Subject: 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 --- sys/vm/vm_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/vm') diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 87c892d60c7a..10fe984e3986 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)) -- cgit v1.3