mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
vmm: make sure there is a thread in the struct in the dealwithrequest call
This commit is contained in:
+5
-1
@@ -639,7 +639,11 @@ bool vmm_allocnowat(void* addr, size_t mmuflags, size_t size){
|
||||
// called by the page fault handler
|
||||
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user