Skip to content

Commit c453db6

Browse files
committed
nds32: fix up stack guard gap
Commit 1be7107 ("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 <nickhu@andestech.com> Cc: Greentime Hu <green.hu@gmail.com> Cc: Vincent Chen <deanbo422@gmail.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Hugh Dickins <hughd@google.com> Cc: Qiang Liu <cyruscyliu@gmail.com> Cc: stable <stable@vger.kernel.org> Reported-by: iLifetruth <yixiaonn@gmail.com> Acked-by: Hugh Dickins <hughd@google.com> Link: https://lore.kernel.org/r/20210629104024.2293615-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ebea676 commit c453db6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/nds32/mm/mmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
5959

6060
vma = find_vma(mm, addr);
6161
if (TASK_SIZE - len >= addr &&
62-
(!vma || addr + len <= vma->vm_start))
62+
(!vma || addr + len <= vm_start_gap(vma)))
6363
return addr;
6464
}
6565

0 commit comments

Comments
 (0)