We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 894476f commit ca372f3Copy full SHA for ca372f3
src/aero_kernel/src/syscall/fs.rs
@@ -138,7 +138,7 @@ pub fn close(fd: usize) -> Result<usize, AeroSyscallError> {
138
}
139
140
pub fn chdir(path: usize, size: usize) -> Result<usize, AeroSyscallError> {
141
- let buffer = validate_str(path as *mut u8, size).ok_or(AeroSyscallError::EINVAL)?;
+ let buffer = controlregs::with_userspace_access(||validate_str(path as *mut u8, size).ok_or(AeroSyscallError::EINVAL))?;
142
let inode = fs::lookup_path(Path::new(buffer))?;
143
144
if !inode.inode().metadata()?.is_directory() {
0 commit comments