aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/dtrace/profile
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2026-09-24 15:49:37 +0000
committerMark Johnston <markj@FreeBSD.org>2026-09-24 15:51:06 +0000
commit742e58ddc989563f90a1d636cb29793641784ca1 (patch)
treea972d011d1be0246232bdd3c31f81915a02e9ded /sys/modules/dtrace/profile
parentb9811d13572b93adff2da16508eef18872b24c85 (diff)
vm_page: Fix the error path in vm_page_alloc_contig_domain()HEADmain
If we are inserting a run of pages into a VM object and fail at some point due to a memory allocation failure, we have to free all of the pages in the run. We do that by resetting some fields and calling vm_page_free_toq() on each page; this removes the page from the object and frees it back to the buddy allocator. If the page is supposed to be wired, we reset the reference count, but this was done incorrectly: the VPRC_OBJREF flag must be retained as the page still belongs to an object. Resetting it to zero will cause a panic in vm_page_free_prep(): vm_page_free_object_prep() will subtract VPRC_OBJREF from the refcount, causing underflow, and vm_page_free_prep() subsequently calls panic() if the refcount is non-zero. Reviewed by: alc, kib Fixes: fee2a2fa3983 ("Change synchonization rules for vm_page reference counting.") MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D59908
Diffstat (limited to 'sys/modules/dtrace/profile')
0 files changed, 0 insertions, 0 deletions