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:
1c1cb57
)
ARM: prevent VM_GROWSDOWN mmaps extending below FIRST_USER_ADDRESS
author
Russell King
<rmk+kernel@arm.linux.org.uk>
Wed, 16 May 2012 14:19:20 +0000
(15:19 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 21 May 2012 16:40:01 +0000
(09:40 -0700)
commit
9b61a4d1b2064dbd0c9e61754305ac852170509f
upstream.
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mm/fault.c
patch
|
blob
|
history
diff --git
a/arch/arm/mm/fault.c
b/arch/arm/mm/fault.c
index bc0e1d88fd3ba8b7863edfc9eca9cb11d90413dd..8799eae5da9b61eaa6b34263d41e6083b06826cc 100644
(file)
--- a/
arch/arm/mm/fault.c
+++ b/
arch/arm/mm/fault.c
@@
-266,7
+266,9
@@
good_area:
return fault;
check_stack:
- if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr))
+ /* Don't allow expansion below FIRST_USER_ADDRESS */
+ if (vma->vm_flags & VM_GROWSDOWN &&
+ addr >= FIRST_USER_ADDRESS && !expand_stack(vma, addr))
goto good_area;
out:
return fault;