Module Name: src Committed By: chs Date: Fri Mar 26 09:35:18 UTC 2021
Modified Files: src/sys/uvm: uvm_pglist.c Log Message: in uvm_pglistalloc_contig_aggressive(), avoid looking forward past the end of the target range of the physseg. fixes PR 56074. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/uvm/uvm_pglist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_pglist.c diff -u src/sys/uvm/uvm_pglist.c:1.87 src/sys/uvm/uvm_pglist.c:1.88 --- src/sys/uvm/uvm_pglist.c:1.87 Wed Mar 24 06:37:27 2021 +++ src/sys/uvm/uvm_pglist.c Fri Mar 26 09:35:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pglist.c,v 1.87 2021/03/24 06:37:27 skrll Exp $ */ +/* $NetBSD: uvm_pglist.c,v 1.88 2021/03/26 09:35:18 chs Exp $ */ /*- * Copyright (c) 1997, 2019 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.87 2021/03/24 06:37:27 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.88 2021/03/26 09:35:18 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -401,6 +401,9 @@ uvm_pglistalloc_contig_aggressive(int nu * Look forward for any remaining pages. */ + if (spa + ptoa(num) > rhi) { + continue; + } for (; run < num; run++) { pg = PHYS_TO_VM_PAGE(spa + ptoa(run)); if ((pg->flags & PG_PGLCA) == 0) {