mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-17 02:26:46 +00:00
Fix deadlock in FLUSH_OPS by disabling IRQ
This commit is contained in:
parent
6c4f56723c
commit
5313689d6f
@ -9,7 +9,7 @@ use super::{page::DynPage, Vaddr, PAGE_SIZE};
|
|||||||
use crate::{
|
use crate::{
|
||||||
cpu::{CpuSet, PinCurrentCpu},
|
cpu::{CpuSet, PinCurrentCpu},
|
||||||
cpu_local,
|
cpu_local,
|
||||||
sync::SpinLock,
|
sync::{LocalIrqDisabled, SpinLock},
|
||||||
task::disable_preempt,
|
task::disable_preempt,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -155,8 +155,8 @@ impl TlbFlushOp {
|
|||||||
//
|
//
|
||||||
// Lock ordering: lock FLUSH_OPS before PAGE_KEEPER.
|
// Lock ordering: lock FLUSH_OPS before PAGE_KEEPER.
|
||||||
cpu_local! {
|
cpu_local! {
|
||||||
static FLUSH_OPS: SpinLock<OpsStack> = SpinLock::new(OpsStack::new());
|
static FLUSH_OPS: SpinLock<OpsStack, LocalIrqDisabled> = SpinLock::new(OpsStack::new());
|
||||||
static PAGE_KEEPER: SpinLock<Vec<DynPage>> = SpinLock::new(Vec::new());
|
static PAGE_KEEPER: SpinLock<Vec<DynPage>, LocalIrqDisabled> = SpinLock::new(Vec::new());
|
||||||
}
|
}
|
||||||
|
|
||||||
fn do_remote_flush() {
|
fn do_remote_flush() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user