git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[MIPS] sys_mmap2 offset argument should always be shifted 12, not PAGE_SHIFT.
[safe/jmp/linux-2.6]
/
arch
/
mips
/
kernel
/
linux32.c
diff --git
a/arch/mips/kernel/linux32.c
b/arch/mips/kernel/linux32.c
index
1e8d248
..
013bc93
100644
(file)
--- a/
arch/mips/kernel/linux32.c
+++ b/
arch/mips/kernel/linux32.c
@@
-106,6
+106,10
@@
sys32_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
unsigned long error;
error = -EINVAL;
+ if (pgoff & (~PAGE_MASK >> 12))
+ goto out;
+ pgoff >>= PAGE_SHIFT-12;
+
if (!(flags & MAP_ANONYMOUS)) {
error = -EBADF;
file = fget(fd);