1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-26 09:53:28 +04:00

Fix the bug of active_table_swap() wrongly force unlock in pg fault handler

This commit is contained in:
lcy1996 2018-11-17 23:17:42 +08:00
parent b2fec2b16b
commit 76d2c6ec7b
2 changed files with 3 additions and 1 deletions

View File

@ -23,6 +23,8 @@ impl SwapManager for FifoSwapManager {
.position(|ref x| x.get_virtaddr() == addr && x.get_token() == token)
.expect("address not found");
self.deque.remove(id);
//info!("SwapManager remove token finished: {:x?} vaddr: {:x?}", token, addr);
}
fn pop<T, S>(&mut self, _: &mut T, _: &mut S) -> Option<Frame>

View File

@ -108,7 +108,7 @@ impl Drop for KernelStack {
*/
pub fn page_fault_handler(addr: usize) -> bool {
info!("start handling swap in/out page fault");
unsafe { ACTIVE_TABLE_SWAP.force_unlock(); }
//unsafe { ACTIVE_TABLE_SWAP.force_unlock(); }
info!("active page table token in pg fault is {:x?}", ActivePageTable::token());
let mmset_record = memory_set_record();