aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-21 04:12:16 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-04-21 04:12:16 -0400
commit4db25d496c09fdf094d52d11a90ae51f9ee473c6 (patch)
tree77ab8003db1d6ccbcf3a9acafad26002fba37b63 /arch/sh
parentb8c193f88ebd8705b3e916532539031cd9fc0b4c (diff)
parent8c31813f31cd4403b46802866949a95a6e8fa584 (diff)
Merge branch 'sh/stable-updates' into sh/for-2.6.30
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/sys_sh.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c
index 58dfc02c7af1..e3a7e36639ef 100644
--- a/arch/sh/kernel/sys_sh.c
+++ b/arch/sh/kernel/sys_sh.c
@@ -63,6 +63,15 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
63 unsigned long prot, unsigned long flags, 63 unsigned long prot, unsigned long flags,
64 unsigned long fd, unsigned long pgoff) 64 unsigned long fd, unsigned long pgoff)
65{ 65{
66 /*
67 * The shift for mmap2 is constant, regardless of PAGE_SIZE
68 * setting.
69 */
70 if (pgoff & ((1 << (PAGE_SHIFT - 12)) - 1))
71 return -EINVAL;
72
73 pgoff >>= PAGE_SHIFT - 12;
74
66 return do_mmap2(addr, len, prot, flags, fd, pgoff); 75 return do_mmap2(addr, len, prot, flags, fd, pgoff);
67} 76}
68 77