Remove what I think is an incorrect assert from vm.cc.

In vmap::pagefault the assert assumed a PRIVATE vma would have a vmnode with 1 ref. In vmap::copy, however, the vmnode reference is incremented, then the vma is replaced with one of type COW. If a thread is pagefaulting while another is forking there is a race.
上级 ba0c5af6
......@@ -546,7 +546,6 @@ vmap::pagefault(uptr va, u32 err)
if (m->va_type == COW) {
*pte = v2p(m->n->page[npg]) | PTE_P | PTE_U | PTE_COW;
} else {
assert(m->n->ref == 1);
*pte = v2p(m->n->page[npg]) | PTE_P | PTE_U | PTE_W;
}
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论