avoid pointer check when reading a file in mmap(!MAP_FIXED)

address specified by the user is only a hint,
it should not be checked.
This commit is contained in:
NAKAMURA Gou
2013-05-31 10:44:00 +09:00
parent d70dd2338c
commit d836b92bc2

View File

@ -554,7 +554,7 @@ SYSCALL_DECLARE(mmap)
kprintf("syscall.c,!MAP_FIXED,!MAP_ANONYMOUS,MAP_PRIVATE\n");
// lseek(mmap_fd, mmap_off, SEEK_SET);
// read(mmap_fd, mmap_addr, mmap_len);
SYSCALL_ARGS_6(MO, D, D, D, D, D);
SYSCALL_ARGS_6(D, D, D, D, D, D);
// overwriting request.args[0]
unsigned long __phys;
if (ihk_mc_pt_virt_to_phys(cpu_local_var(current)->vm->page_table, (void *)s, &__phys)) {