diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 09:22:41 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 09:22:41 -0800 |
commit | e031d33efde817ce6b4f907f0fa1ff021301748f (patch) | |
tree | 2e9ba300db601f61fdc32813f55114d363d3d4e2 /arch/mips/kernel/syscall.c | |
parent | 52aef8183fbedb0232b20127b089e85e7aa095e3 (diff) | |
parent | 48e08101c0fa0e1767cdef13fdaea79cad3106a2 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Update defconfigs.
[MIPS] Separate CPU entries in /proc/cpuinfo with a blank line.
[MIPS] sys_mmap2 offset argument should always be shifted 12, not PAGE_SHIFT.
[MIPS] TX49XX has prefetch.
[MIPS] Kill tlb-andes.c.
[MIPS] War on whitespace: cleanup initial spaces followed by tabs.
[MIPS] Makefile crapectomy.
[MIPS] Reformat __xchg().
[MIPS] Mention Broadcom part number for BigSur board
[MIPS] Remove CONFIG_BUILD_ELF64.
[MIPS] Further sparsification for 32-bit compat code.
[MIPS] fix wrong __user usage in _sysn32_rt_sigsuspend
[MIPS] Signal cleanup
[MIPS] Reformat all of signal32.c with tabs instead of space for consistency
[MIPS] Delete unused sys32_waitpid.
[MIPS] Make I/O helpers more customizable
[MIPS] Symmetric Uniprocessor support for Qemu.
[MIPS] sc-rm7k.c cleanup
[MIPS] MIPS64 R2 optimizations for 64-bit endianess swapping.
[MIPS] Add early console for Cobalt.
Diffstat (limited to 'arch/mips/kernel/syscall.c')
-rw-r--r-- | arch/mips/kernel/syscall.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 1da2eeb3ef9..2aeaa2fd4b3 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -162,7 +162,10 @@ asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long pgoff) { - return do_mmap2(addr, len, prot, flags, fd, pgoff); + if (pgoff & (~PAGE_MASK >> 12)) + return -EINVAL; + + return do_mmap2(addr, len, prot, flags, fd, pgoff >> (PAGE_SHIFT-12)); } save_static_function(sys_fork); @@ -345,7 +348,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, union semun fourth; if (!ptr) return -EINVAL; - if (get_user(fourth.__pad, (void *__user *) ptr)) + if (get_user(fourth.__pad, (void __user *__user *) ptr)) return -EFAULT; return sys_semctl (first, second, third, fourth); } |