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:
+5
-1
@@ -639,7 +639,11 @@ bool vmm_allocnowat(void* addr, size_t mmuflags, size_t size){
|
|||||||
// called by the page fault handler
|
// called by the page fault handler
|
||||||
|
|
||||||
int vmm_dealwithrequest(void* addr, long error, bool user){
|
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)
|
if(user && addr > USER_SPACE_END)
|
||||||
return EFAULT;
|
return EFAULT;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user