Skip to content

Commit 9150f0b

Browse files
committed
rmdir: Fix SMAP violation
Signed-off-by: Dennis Bonke <[email protected]>
1 parent de574a6 commit 9150f0b

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
@@ -199,7 +199,7 @@ pub fn mkdir(path: usize, size: usize) -> Result<usize, AeroSyscallError> {
199199
}
200200

201201
pub fn rmdir(path: usize, size: usize) -> Result<usize, AeroSyscallError> {
202-
let path_str = validate_str(path as *mut u8, size).ok_or(AeroSyscallError::EINVAL)?;
202+
let path_str = controlregs::with_userspace_access(||validate_str(path as *mut u8, size).ok_or(AeroSyscallError::EINVAL))?;
203203
let path = Path::new(path_str);
204204

205205
let (_, child) = path.parent_and_basename();

0 commit comments

Comments
 (0)