diff options
author | Greg Kroah-Hartman <[email protected]> | 2021-06-29 12:40:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2021-07-21 15:51:37 +0200 |
commit | c453db6cd96418c79702eaf38259002755ab23ff (patch) | |
tree | c8c06a287ae9a33d7cdb6d3c14d933cc25e0e0eb | |
parent | ebea6761b620d758ed77d2df70fab1ae7a363151 (diff) |
nds32: fix up stack guard gap
Commit 1be7107fbe18 ("mm: larger stack guard gap, between vmas") fixed
up all architectures to deal with the stack guard gap. But when nds32
was added to the tree, it forgot to do the same thing.
Resolve this by properly fixing up the nsd32's version of
arch_get_unmapped_area()
Cc: Nick Hu <[email protected]>
Cc: Greentime Hu <[email protected]>
Cc: Vincent Chen <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Qiang Liu <[email protected]>
Cc: stable <[email protected]>
Reported-by: iLifetruth <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | arch/nds32/mm/mmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/nds32/mm/mmap.c b/arch/nds32/mm/mmap.c index c206b31ce07a..1bdf5e7d1b43 100644 --- a/arch/nds32/mm/mmap.c +++ b/arch/nds32/mm/mmap.c @@ -59,7 +59,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, vma = find_vma(mm, addr); if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <= vm_start_gap(vma))) return addr; } |