Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Oct 2018 18:14:19 +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-11@freebsd.org
Subject:   svn commit: r339203 - stable/11/sys/vm
Message-ID:  <201810051814.w95IEJnu019885@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



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