diff options
author | Mark Johnston <markj@FreeBSD.org> | 2025-04-10 12:43:12 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2025-04-10 12:47:05 +0000 |
commit | ae10431c9833bd6b176afe4d8021d233fd985107 (patch) | |
tree | 3504f3d178cc7c24e398c00e90e4ad24462d77c3 /contrib/groff/font/devps/(public-mirror) | |
parent | d80ab37f9883cb981c9b359d50bbfe8f0d6f2884 (diff) |
There is at least one case where we need to support it: kmem_malloc()
might need to allocate multiple pages to satisfy a NOFREE allocation,
which it implements by calling vm_page_alloc() in a loop. If it fails
part-way though, it needs to free already-allocated pages, but this was
illegal.
Convert the bump allocator to a linked list; (ab)use the pindex field of
each page in the list to store the number of contiguous pages in the
block. (Originally I added a new plinks member for this purpose, but
it's not safe to use that until after vm_page_dequeue() is called due to
lazy page queue removal.) Then, modify vm_page_free() to support freeing
pages to this list.
While here, add a __noinline qualifier to vm_page_alloc_nofree_domain()
to ensure that it doesn't get inlined into a hot path.
Reported by: syzbot+93bc9edd2d0f22ae426a@syzkaller.appspotmail.com
Reviewed by: bnovkov, kib
Fixes: a8693e89e3e4 ("vm: Introduce vm_page_alloc_nofree_domain")
Differential Revision: https://reviews.freebsd.org/D49480
Diffstat (limited to 'contrib/groff/font/devps/(public-mirror)')
0 files changed, 0 insertions, 0 deletions