提交 8284cf8d 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

deadlock: if the caller of tlbflush is holding a spinlock, another

CPU may have interrupts disabled waiting for that spinlock too, and will never acknowledge our tlb flush..
上级 ea058e70
......@@ -219,6 +219,11 @@ tlbflush()
u64 myreq = tlbflush_req++;
pushcli();
// the caller may not hold any spinlock, because other CPUs might
// be spinning waiting for that spinlock, with interrupts disabled,
// so we will deadlock waiting for their TLB flush..
assert(mycpu()->ncli == 1);
int myid = mycpu()->id;
lcr3(rcr3());
popcli();
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论