diff options
| author | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 11:02:08 +0100 |
|---|---|---|
| committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 11:02:08 +0100 |
| commit | 5501972e0b5857bc8354770d900ceb9b40c7f6b7 (patch) | |
| tree | ff239422827c4cd54d2998f8851304255de31b38 /arch/mips/kernel/syscall.c | |
| parent | 9d2f928ddf64ca0361562e30faf584cd33055c60 (diff) | |
| parent | e952f31bce6e9f64db01f607abc46529ba57ac9e (diff) | |
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
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 1da2eeb3ef9e..2aeaa2fd4b32 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); } |
