summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-02-16 03:43:57 +0000
committeralc <alc@FreeBSD.org>2004-02-16 03:43:57 +0000
commit600caa157eae5e9619a172eb362d497bf39da392 (patch)
tree1515e6dab984bff1f3aa4032a1e7304666a31760 /sys/vm
parent1e2ef501f0d5f552cae8e4514235ae939d09a69d (diff)
downloadFreeBSD-src-600caa157eae5e9619a172eb362d497bf39da392.zip
FreeBSD-src-600caa157eae5e9619a172eb362d497bf39da392.tar.gz
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
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_contig.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c
index fcdd45d..311a87a 100644
--- a/sys/vm/vm_contig.c
+++ b/sys/vm/vm_contig.c
@@ -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) {
OpenPOWER on IntegriCloud