aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-12-11 06:48:57 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-12-11 06:48:57 -0500
commitaa65607373a4daf2010e8c3867b6317619f3c1a3 (patch)
tree8a221e60d97cdfa2064df53f7da3061a18add7a2 /arch
parente77414e0aad6a1b063ba5e5750c582c75327ea6a (diff)
Add missing alignment check in arch/score sys_mmap()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch')
-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 3d6a67dd628c..856ed68a58e6 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,
41 41
42asmlinkage long 42asmlinkage long
43sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, 43sys_mmap(unsigned long addr, unsigned long len, unsigned long prot,
44 unsigned long flags, unsigned long fd, off_t pgoff) 44 unsigned long flags, unsigned long fd, off_t offset)
45{ 45{
46 /* where's the alignment check? */ 46 if (unlikely(offset & ~PAGE_MASK))
47 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT); 47 return -EINVAL;
48 return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
48} 49}
49 50
50asmlinkage long 51asmlinkage long