From b75c4603356920aba0c19c01290d1cb91ba5d186 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Mon, 4 Jan 2021 14:45:37 -0500 Subject: [PATCH] fs/exec: Use vma_next() instead of linked list Signed-off-by: Liam R. Howlett --- fs/exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index 1dd658ac3390..95b317e0ceca 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -713,7 +713,7 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift) * when the old and new regions overlap clear from new_end. */ free_pgd_range(&tlb, new_end, old_end, new_end, - vma->vm_next ? vma->vm_next->vm_start : USER_PGTABLES_CEILING); + vma_next(mm, vma) ? vma_next(mm, vma)->vm_start : USER_PGTABLES_CEILING); } else { /* * otherwise, clean from old_start; this is done to not touch @@ -722,7 +722,7 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift) * for the others its just a little faster. */ free_pgd_range(&tlb, old_start, old_end, new_end, - vma->vm_next ? vma->vm_next->vm_start : USER_PGTABLES_CEILING); + vma_next(mm, vma) ? vma_next(mm, vma)->vm_start : USER_PGTABLES_CEILING); } tlb_finish_mmu(&tlb, old_start, old_end); -- 2.50.1