From b2585eb3bdd2c92d3b76113e8cd92519022c7614 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Sat, 23 Mar 2019 00:22:33 +0800 Subject: [PATCH] Fix last commit --- kernel/src/syscall/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/src/syscall/fs.rs b/kernel/src/syscall/fs.rs index c68ec8d..9341205 100644 --- a/kernel/src/syscall/fs.rs +++ b/kernel/src/syscall/fs.rs @@ -622,7 +622,7 @@ pub fn sys_sendfile(out_fd: usize, in_fd: usize, offset: *mut usize, count: usiz return Ok(bytes_read); } else { let mut proc_mem = unsafe {&mut *proc_cell.get()}; - proc_mem.vm.check_mut_ptr(offset)?; + proc_mem.vm.check_read_ptr(offset)?; let mut read_offset = unsafe { *offset };