Correct a long-standing race condition in vm_fault() 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. Reviewed by: tegge MFC after: 7 days
This commit is contained in:
parent
862bba7a70
commit
c6d9ef2e1f
@ -488,10 +488,8 @@ readrest:
|
|||||||
mt->hold_count ||
|
mt->hold_count ||
|
||||||
mt->wire_count)
|
mt->wire_count)
|
||||||
continue;
|
continue;
|
||||||
if (mt->dirty == 0)
|
pmap_remove_all(mt);
|
||||||
vm_page_test_dirty(mt);
|
|
||||||
if (mt->dirty) {
|
if (mt->dirty) {
|
||||||
pmap_remove_all(mt);
|
|
||||||
vm_page_deactivate(mt);
|
vm_page_deactivate(mt);
|
||||||
} else {
|
} else {
|
||||||
vm_page_cache(mt);
|
vm_page_cache(mt);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user