mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
vmm: make sure there is a thread in the struct in the dealwithrequest call
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user