Correct a long-standing race condition in vm_contig_launder() that could

result in a panic "vm_page_cache: caching a dirty page, ...": Access to the
page must be restricted or removed before calling vm_page_cache().  This
race condition is identical in nature to that which was addressed by
vm_pageout.c's revision 1.251 and vm_page.c's revision 1.275.

MFC after:	7 days
This commit is contained in:
Alan Cox 2004-02-16 03:43:57 +00:00
parent eaecffb942
commit 5850fa3e42

View File

@ -105,6 +105,8 @@ vm_contig_launder(int queue)
return (TRUE);
}
vm_page_test_dirty(m);
if (m->dirty == 0 && m->busy == 0 && m->hold_count == 0)
pmap_remove_all(m);
if (m->dirty) {
object = m->object;
if (object->type == OBJT_VNODE) {