aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_thr.c
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2015-07-11 15:21:37 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2015-07-11 15:21:37 +0000
commit6520495abc109aa5af083b7cde70e4cf9c338de0 (patch)
tree21c5a6bf05b26992a7aef1cefc9874f34b43fbec /sys/kern/kern_thr.c
parentd7852cbcf2b9da1f866c85019c949ba81107289b (diff)
downloadsrc-6520495abc109aa5af083b7cde70e4cf9c338de0.tar.gz
src-6520495abc109aa5af083b7cde70e4cf9c338de0.zip
Notes
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r--sys/kern/kern_thr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index e6b0a59fcc7a..7e7b88f3b7a6 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -54,6 +54,8 @@ __FBSDID("$FreeBSD$");
#include <sys/umtx.h>
#include <sys/limits.h>
+#include <vm/vm_domain.h>
+
#include <machine/frame.h>
#include <security/audit/audit.h>
@@ -254,6 +256,13 @@ create_thread(struct thread *td, mcontext_t *ctx,
thread_unlock(td);
if (P_SHOULDSTOP(p))
newtd->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK;
+
+ /*
+ * Copy the existing thread VM policy into the new thread.
+ */
+ vm_domain_policy_localcopy(&newtd->td_vm_dom_policy,
+ &td->td_vm_dom_policy);
+
PROC_UNLOCK(p);
tidhash_add(newtd);