From e196159c32af10b73074dc10646e502ea68f4415 Mon Sep 17 00:00:00 2001 From: mjg Date: Wed, 10 Jun 2015 15:34:43 +0000 Subject: linux: make sure to grab all cow structs when creating a thread This is a fixup for r284214. Reported and tested by: Ivan Klymenko --- sys/compat/linux/linux_fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/compat/linux/linux_fork.c') diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c index 0fd47fd..394c26f 100644 --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -298,7 +298,7 @@ linux_clone_thread(struct thread *td, struct linux_clone_args *args) __rangeof(struct thread, td_startcopy, td_endcopy)); newtd->td_proc = p; - newtd->td_ucred = crhold(td->td_ucred); + thread_cow_get(newtd, td); /* create the emuldata */ linux_proc_init(td, newtd, args->flags); -- cgit v1.1