Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jun 2017 05:21:00 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r320437 - stable/10/sys/vm
Message-ID:  <201706280521.v5S5L0xl021241@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Jun 28 05:21:00 2017
New Revision: 320437
URL: https://svnweb.freebsd.org/changeset/base/320437

Log:
  MFC r320202:
  Call pmap_copy() only for map entries which have the backing object
  instantiated.

Modified:
  stable/10/sys/vm/vm_map.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/vm_map.c
==============================================================================
--- stable/10/sys/vm/vm_map.c	Wed Jun 28 05:20:28 2017	(r320436)
+++ stable/10/sys/vm/vm_map.c	Wed Jun 28 05:21:00 2017	(r320437)
@@ -3185,6 +3185,10 @@ vm_map_copy_entry(
 				fake_entry->next = curthread->td_map_def_user;
 				curthread->td_map_def_user = fake_entry;
 			}
+
+			pmap_copy(dst_map->pmap, src_map->pmap,
+			    dst_entry->start, dst_entry->end - dst_entry->start,
+			    src_entry->start);
 		} else {
 			dst_entry->object.vm_object = NULL;
 			dst_entry->offset = 0;
@@ -3194,9 +3198,6 @@ vm_map_copy_entry(
 				*fork_charge += size;
 			}
 		}
-
-		pmap_copy(dst_map->pmap, src_map->pmap, dst_entry->start,
-		    dst_entry->end - dst_entry->start, src_entry->start);
 	} else {
 		/*
 		 * We don't want to make writeable wired pages copy-on-write.



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