We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 894476f commit b4ac14dCopy full SHA for b4ac14d
src/aero_kernel/src/syscall/fs.rs
@@ -139,7 +139,7 @@ pub fn close(fd: usize) -> Result<usize, AeroSyscallError> {
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)?;
142
- let inode = fs::lookup_path(Path::new(buffer))?;
+ let inode = controlregs::with_userspace_access(||fs::lookup_path(Path::new(buffer)))?;
143
144
if !inode.inode().metadata()?.is_directory() {
145
// A component of path is not a directory.
0 commit comments