paging: fix free unused pte
This commit is contained in:
parent
ea9e5f7f23
commit
ac64b124da
@ -150,7 +150,7 @@ int pageMap(vaddr_t vaddr, paddr_t paddr, int flags)
|
||||
|
||||
__native_flush_tlb_single((vaddr_t)pt);
|
||||
memset((void *)pt, 0, PAGE_SIZE);
|
||||
}
|
||||
} else {
|
||||
|
||||
// Already mapped ? Remove old mapping
|
||||
if (pt[ptEntry].present) {
|
||||
@ -159,6 +159,7 @@ int pageMap(vaddr_t vaddr, paddr_t paddr, int flags)
|
||||
else {
|
||||
refPhyPage(pd[pdEntry].pt_addr << PAGE_SHIFT);
|
||||
}
|
||||
}
|
||||
|
||||
pt[ptEntry].user = (flags & PAGING_MEM_USER) ? 1 : 0;
|
||||
pt[ptEntry].present = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user