]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/mlock: Fix mas_for_each() loop limit
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 22 Dec 2020 02:00:06 +0000 (21:00 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:33:41 +0000 (12:33 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/mlock.c

index 4f6350aa982dc447dfc1101aed561322811258c0..2c27597ebcf6bbdbaf580ab52690c41b8104fea4 100644 (file)
@@ -652,7 +652,7 @@ static unsigned long count_mm_mlocked_page_nr(struct mm_struct *mm,
        if (mm == NULL)
                mm = current->mm;
 
-       mas_for_each(&mas, vma, ULONG_MAX) {
+       mas_for_each(&mas, vma, start + len) {
                if (start >= vma->vm_end)
                        continue;
                if (start + len <=  vma->vm_start)