vmm: make sure there is a thread in the struct in the dealwithrequest call

This commit is contained in:
Matheus
2023-01-08 19:30:31 -03:00
parent c08644d7fb
commit e7467e5ce8
+4
View File
@@ -640,6 +640,10 @@ bool vmm_allocnowat(void* addr, size_t mmuflags, size_t size){
int vmm_dealwithrequest(void* addr, long error, bool user){
if(!arch_getcls()->thread) // the fault happened before the scheduler was initialised.
return EFAULT;
if(user && addr > USER_SPACE_END)
return EFAULT;