Skip to content

Commit 8ea220a

Browse files
committed
mkdir: Fix SMAP violation
Signed-off-by: Dennis Bonke <[email protected]>
1 parent b4ac14d commit 8ea220a

File tree

1 file changed

+1
-1
lines changed
  • src/aero_kernel/src/syscall

1 file changed

+1
-1
lines changed

src/aero_kernel/src/syscall/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ pub fn chdir(path: usize, size: usize) -> Result<usize, AeroSyscallError> {
151151
}
152152

153153
pub fn mkdirat(dfd: usize, path: usize, size: usize) -> Result<usize, AeroSyscallError> {
154-
let path_str = validate_str(path as *mut u8, size).ok_or(AeroSyscallError::EINVAL)?;
154+
let path_str = controlregs::with_userspace_access(||validate_str(path as *mut u8, size).ok_or(AeroSyscallError::EINVAL))?;
155155
let path = Path::new(path_str);
156156

157157
// NOTE: If the pathname given in pathname is relative, then it is interpreted

0 commit comments

Comments
 (0)