Skip to content

Commit

Permalink
vm_object: Assert that managed pages are on pagequeues when freeing
Browse files Browse the repository at this point in the history
Reviewed by:	dougm, kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D46945
  • Loading branch information
markjdb committed Oct 21, 2024
1 parent 6c40282 commit 5fc3437
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sys/vm/vm_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,9 @@ vm_object_terminate_single_page(vm_page_t p, void *objectv)
("%s: page %p is inconsistent", __func__, p));
p->object = NULL;
if (vm_page_drop(p, VPRC_OBJREF) == VPRC_OBJREF) {
KASSERT((object->flags & OBJ_UNMANAGED) != 0 ||
vm_page_astate_load(p).queue != PQ_NONE,
("%s: page %p does not belong to a queue", __func__, p));
VM_CNT_INC(v_pfree);
vm_page_free(p);
}
Expand Down

0 comments on commit 5fc3437

Please sign in to comment.