mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
vmm: acqure space mutex in page fault handler
This commit is contained in:
@@ -303,6 +303,7 @@ bool vmm_pagefault(void *addr, bool user, int actions) {
|
||||
return false;
|
||||
|
||||
MUTEX_ACQUIRE(&space->pflock, false);
|
||||
MUTEX_ACQUIRE(&space->lock, false);
|
||||
vmmrange_t *range = getrange(space, addr);
|
||||
|
||||
bool status = false;
|
||||
@@ -369,6 +370,7 @@ bool vmm_pagefault(void *addr, bool user, int actions) {
|
||||
}
|
||||
|
||||
cleanup:
|
||||
MUTEX_RELEASE(&space->lock);
|
||||
MUTEX_RELEASE(&space->pflock);
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user