projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Security: round mmap hint address above mmap_min_addr
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
mm
/
mmap.c
diff --git
a/mm/mmap.c
b/mm/mmap.c
index 938313c76d02f4f6d9ef62471330836ae6448f73..f4cfc6ac08dbbc2e4bb0e937ee256d65ea1973fa 100644
(file)
--- a/
mm/mmap.c
+++ b/
mm/mmap.c
@@
-912,6
+912,9
@@
unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
if (!len)
return -EINVAL;
+ if (!(flags & MAP_FIXED))
+ addr = round_hint_to_min(addr);
+
error = arch_mmap_check(addr, len, flags);
if (error)
return error;