projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
998de4a
)
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
Russell King
<rmk+kernel@arm.linux.org.uk>
Wed, 16 May 2012 14:20:59 +0000
(15:20 +0100)
Cc: <stable@vger.kernel.org>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/fault.c
patch
|
blob
|
history
diff --git
a/arch/arm/mm/fault.c
b/arch/arm/mm/fault.c
index f0746753336546448a3512e297444fe3137f1c07..5bb48356d217292a074b006cc432447da6880ffd 100644
(file)
--- a/
arch/arm/mm/fault.c
+++ b/
arch/arm/mm/fault.c
@@
-247,7
+247,9
@@
good_area:
return handle_mm_fault(mm, vma, addr & PAGE_MASK, flags);
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;