Fix a number of races. First, retain PG_BUSY through a vm_page_remove(),
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 17 Sep 2004 10:02:12 +0000 (10:02 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 17 Sep 2004 10:02:12 +0000 (10:02 +0000)
commit9765affacb9c381d9ceb24f5914ec4d0a640f7fa
tree09606db3dff67abbe7d377972140611ac8361a45
parent6d93b0a34b58d17e06bbf6041593e99fb6953148
Fix a number of races.  First, retain PG_BUSY through a vm_page_remove(),
allowing it to be held atomically through a vm_page_rename() and
through most of a vm_page_free_toq() call.  Before vm_page_remove() unbusy'd
the page, leading to possible races and definite future issues.

Use a critical section instead of splvm() for critical VM page operations,
to protect against IPIs.

In-discussion-with: David Rhodus
sys/vm/vm_object.c
sys/vm/vm_page.c