提交 a2fb0954 创建 作者: David Benjamin's avatar David Benjamin

Let the process die instead of panic on failure to allocate page tables

We panic all over the place on OOM, but it'd be good to slowly work towards slightly saner error handling.
上级 728f8126
......@@ -479,8 +479,10 @@ vmap::pagefault(uptr va, u32 err)
return -1;
atomic<pme_t> *pte = walkpgdir(pml4, va, 1);
if (pte == nullptr)
panic("pagefault: couldn't allocate page table");
if (pte == nullptr) {
cprintf("pagefault: couldn't allocate page table\n");
return -1;
}
retry:
pme_t ptev = pte->load();
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论