Skip to content

Commit

Permalink
修复mprotect系统调用未正确设置vm_flags的错误 (DragonOS-Community#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
MemoryShore authored and Samuka007 committed Jul 25, 2024
1 parent ade7f1a commit a2afbaf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/src/mm/ucontext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ impl InnerAddressSpace {
return Err(SystemError::EACCES);
}

r_guard.set_vm_flags(VmFlags::from(prot_flags));

let new_flags: PageFlags<MMArch> = r_guard
.flags()
.set_execute(prot_flags.contains(ProtFlags::PROT_EXEC))
Expand Down

0 comments on commit a2afbaf

Please sign in to comment.