mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
Add missing alignment check in arch/score sys_mmap()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
e77414e0aa
commit
aa65607373
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue