Commit aa656073 authored by Al Viro's avatar Al Viro
Browse files

Add missing alignment check in arch/score sys_mmap()


Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e77414e0
...@@ -41,10 +41,11 @@ sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, ...@@ -41,10 +41,11 @@ sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
asmlinkage long asmlinkage long
sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, 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? */ if (unlikely(offset & ~PAGE_MASK))
return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT); return -EINVAL;
return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
} }
asmlinkage long asmlinkage long
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment