Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2019 19:32:50 +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-12@freebsd.org
Subject:   svn commit: r351827 - stable/12/sys/vm
Message-ID:  <201909041932.x84JWoxh029996@repo.freebsd.org>

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

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

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

Modified: stable/12/sys/vm/vm_reserv.c
==============================================================================
--- stable/12/sys/vm/vm_reserv.c	Wed Sep  4 19:31:37 2019	(r351826)
+++ stable/12/sys/vm/vm_reserv.c	Wed Sep  4 19:32:50 2019	(r351827)
@@ -316,7 +316,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;
@@ -1164,7 +1165,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) {
 			rv = &vm_reserv_array[paddr >> VM_LEVEL_0_SHIFT];
 			rv->pages = PHYS_TO_VM_PAGE(paddr);
 			rv->domain = seg->domain;



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