We should check if offset of mmap is on the page boundary. H.J. --- --- /tmp/tmp.20947.0 Fri Sep 14 10:05:33 2001 +++ arch/mips/kernel/syscall.c Fri Sep 14 10:05:08 2001 @@ -82,6 +82,8 @@ out: asmlinkage unsigned long old_mmap(unsigned long addr, size_t len, int prot, int flags, int fd, off_t offset) { + if (offset & ~PAGE_MASK) + return -EINVAL; return do_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); }