Fix write rights on pageflt
This commit is contained in:
parent
ccfafe4a04
commit
bf7008fc98
@ -388,7 +388,7 @@ free_reg:
|
||||
int uAddrSpaceSolvePageFault(struct uAddrSpace *as, vaddr_t faultAddr, int isWriteAccess)
|
||||
{
|
||||
struct uAddrVirtualReg *reg;
|
||||
int rights = PAGING_MEM_READ;
|
||||
int rights = PAGING_MEM_READ | PAGING_MEM_USER;
|
||||
|
||||
reg = findVirtualRegionFromAddr(as, faultAddr, 1);
|
||||
|
||||
@ -400,7 +400,7 @@ int uAddrSpaceSolvePageFault(struct uAddrSpace *as, vaddr_t faultAddr, int isWri
|
||||
if (isWriteAccess && !(reg->right & PAGING_MEM_WRITE))
|
||||
return -EACCES;
|
||||
|
||||
if (isWriteAccess)
|
||||
if (isWriteAccess || (reg->right & PAGING_MEM_WRITE))
|
||||
rights |= PAGING_MEM_WRITE;
|
||||
|
||||
if (reg->res->ops->nopage(reg, faultAddr, rights))
|
||||
|
Loading…
Reference in New Issue
Block a user