svn commit: r339203 - stable/11/sys/vm

Konstantin Belousov kib at FreeBSD.org
Fri Oct 5 18:14:19 UTC 2018


Author: kib
Date: Fri Oct  5 18:14:18 2018
New Revision: 339203
URL: https://svnweb.freebsd.org/changeset/base/339203

Log:
  MFC r338998:
  In vm_fault_copy_entry(), we should not assert that entry is charged
  if the dst_object is not of swap type.

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

Modified: stable/11/sys/vm/vm_fault.c
==============================================================================
--- stable/11/sys/vm/vm_fault.c	Fri Oct  5 18:12:49 2018	(r339202)
+++ stable/11/sys/vm/vm_fault.c	Fri Oct  5 18:14:18 2018	(r339203)
@@ -1622,7 +1622,9 @@ vm_fault_copy_entry(vm_map_t dst_map, vm_map_t src_map
 		dst_object->cred = curthread->td_ucred;
 		crhold(dst_object->cred);
 		*fork_charge += dst_object->charge;
-	} else if (dst_object->cred == NULL) {
+	} else if ((dst_object->type == OBJT_DEFAULT ||
+	    dst_object->type == OBJT_SWAP) &&
+	    dst_object->cred == NULL) {
 		KASSERT(dst_entry->cred != NULL, ("no cred for entry %p",
 		    dst_entry));
 		dst_object->cred = dst_entry->cred;


More information about the svn-src-stable-11 mailing list