Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2019 19:31:37 +0000 (UTC)
From:      Aleksandr Rybalko <ray@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r351826 - stable/11/sys/vm
Message-ID:  <201909041931.x84JVbPM028464@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ray
Date: Wed Sep  4 19:31:37 2019
New Revision: 351826
URL: https://svnweb.freebsd.org/changeset/base/351826

Log:
  MFC r351213: assert that td_lk_slocks is not leaked upon return from kernel

Modified:
  stable/11/sys/vm/vm_reserv.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_reserv.c
==============================================================================
--- stable/11/sys/vm/vm_reserv.c	Wed Sep  4 19:23:18 2019	(r351825)
+++ stable/11/sys/vm/vm_reserv.c	Wed Sep  4 19:31:37 2019	(r351826)
@@ -258,7 +258,8 @@ sysctl_vm_reserv_fullpop(SYSCTL_HANDLER_ARGS)
 	for (segind = 0; segind < vm_phys_nsegs; segind++) {
 		seg = &vm_phys_segs[segind];
 		paddr = roundup2(seg->start, VM_LEVEL_0_SIZE);
-		while (paddr + VM_LEVEL_0_SIZE <= seg->end) {
+		while (paddr + VM_LEVEL_0_SIZE > paddr && paddr +
+		    VM_LEVEL_0_SIZE <= seg->end) {
 			rv = &vm_reserv_array[paddr >> VM_LEVEL_0_SHIFT];
 			fullpop += rv->popcnt == VM_LEVEL_0_NPAGES;
 			paddr += VM_LEVEL_0_SIZE;
@@ -851,7 +852,8 @@ vm_reserv_init(void)
 	for (segind = 0; segind < vm_phys_nsegs; segind++) {
 		seg = &vm_phys_segs[segind];
 		paddr = roundup2(seg->start, VM_LEVEL_0_SIZE);
-		while (paddr + VM_LEVEL_0_SIZE <= seg->end) {
+		while (paddr + VM_LEVEL_0_SIZE > paddr && paddr +
+		    VM_LEVEL_0_SIZE <= seg->end) {
 			vm_reserv_array[paddr >> VM_LEVEL_0_SHIFT].pages =
 			    PHYS_TO_VM_PAGE(paddr);
 			paddr += VM_LEVEL_0_SIZE;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909041931.x84JVbPM028464>