aboutsummaryrefslogtreecommitdiff
path: root/arch/score
diff options
context:
space:
mode:
Diffstat (limited to 'arch/score')
-rw-r--r--arch/score/kernel/sys_score.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/score/kernel/sys_score.c b/arch/score/kernel/sys_score.c
index 3d6a67dd628..856ed68a58e 100644
--- a/arch/score/kernel/sys_score.c
+++ b/arch/score/kernel/sys_score.c
@@ -41,10 +41,11 @@ sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
asmlinkage long
sys_mmap(unsigned long addr, unsigned long len, unsigned long prot,
- unsigned long flags, unsigned long fd, off_t pgoff)
+ unsigned long flags, unsigned long fd, off_t offset)
{
- /* where's the alignment check? */
- return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT);
+ if (unlikely(offset & ~PAGE_MASK))
+ return -EINVAL;
+ return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
}
asmlinkage long