vmm: properly release lock on request failure

This commit is contained in:
Matheus
2022-09-11 12:53:41 -03:00
parent 6c681a71d6
commit b3f0ca7cd6
+5 -3
View File
@@ -530,6 +530,7 @@ bool vmm_dealwithrequest(void* addr, long error, bool user){
spinlock_acquire(lock); spinlock_acquire(lock);
bool status; bool status;
vmm_mapping* map = findmappingfromaddr(*start, addr); vmm_mapping* map = findmappingfromaddr(*start, addr);
void* paddr; void* paddr;
@@ -554,9 +555,10 @@ bool vmm_dealwithrequest(void* addr, long error, bool user){
goodmmuflags |= ARCH_MMU_MAP_NOEXEC; goodmmuflags |= ARCH_MMU_MAP_NOEXEC;
if(goodmmuflags != (map->mmuflags & goodmmuflags)) if(goodmmuflags != (map->mmuflags & goodmmuflags)){
return false; status = false;
goto done;
}
// allocate a page // allocate a page