projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e77414e
)
Add missing alignment check in arch/score sys_mmap()
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 11 Dec 2009 11:48:57 +0000
(06:48 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 11 Dec 2009 11:48:57 +0000
(06:48 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/score/kernel/sys_score.c
patch
|
blob
|
history
diff --git
a/arch/score/kernel/sys_score.c
b/arch/score/kernel/sys_score.c
index 3d6a67dd628c23d8b85a013eed3063222742750d..856ed68a58e6103efd22d0496cb2884438f8cfa0 100644
(file)
--- 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