linux: make sure to grab all cow structs when creating a thread

This is a fixup for r284214.

Reported and tested by: Ivan Klymenko <fidaj ukr.net>
This commit is contained in:
Mateusz Guzik 2015-06-10 15:34:43 +00:00
parent ebe071e56a
commit 6871c7c3f1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=284226

View File

@ -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);