Close an interrupt race between vm_page_lookup() and (typically) a
vm_page_sleep_busy() check by using the correct spl protection.
An interrupt can occur inbetween the two operations and unbusy/free
the page in question, causing the busy check to fail and for the code
to fall through and then operate on a page that may have been freed
and possibly even reused. Also note that vm_page_grab() had the same
issue between the lookup, busy check, and vm_page_busy() call.
Close an interrupt race when scanning a VM object's memq. Interrupts
can free pages, removing them from memq, which interferes with memq scans
and can cause a page unassociated with the object to be processed as if it
were associated with the object.
Calls to vm_page_hold() and vm_page_unhold() require spl protection.
Rename the passed socket descriptor argument in sendfile() to make the
code more readable.
Fix several serious bugs in procfs_rwmem(). In particular, force it to
block if a page is busy and then retry.
Get rid of vm_pager_map_pag() and vm_pager_unmap_page(), make the functions
that used to use these routines use SFBUF's instead.
Get rid of the (userland?) 4MB page mapping feature in pmap_object_init_pt()
for now. The code appears to not track the page directory properly and
could result in a non-zero page being freed as PG_ZERO.
This commit also includes updated code comments and some additional
non-operational code cleanups.
19 files changed: