Author: markj Date: Mon Aug 24 13:55:24 2020 New Revision: 364680 URL: https://svnweb.freebsd.org/changeset/base/364680
Log: MFC r364329: Remove "emulation" of clone(CLONE_PARENT | CLONE_THREAD). Modified: stable/12/sys/compat/linux/linux_fork.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_fork.c ============================================================================== --- stable/12/sys/compat/linux/linux_fork.c Mon Aug 24 13:54:58 2020 (r364679) +++ stable/12/sys/compat/linux/linux_fork.c Mon Aug 24 13:55:24 2020 (r364680) @@ -280,6 +280,8 @@ linux_clone_thread(struct thread *td, struct linux_clo td->td_tid, (unsigned)args->flags, args->parent_tidptr, args->child_tidptr); + if ((args->flags & LINUX_CLONE_PARENT) != 0) + return (EINVAL); if (args->flags & LINUX_CLONE_PARENT_SETTID) if (args->parent_tidptr == NULL) return (EINVAL); @@ -342,12 +344,8 @@ linux_clone_thread(struct thread *td, struct linux_clo PROC_LOCK(p); p->p_flag |= P_HADTHREADS; + thread_link(newtd, p); bcopy(p->p_comm, newtd->td_name, sizeof(newtd->td_name)); - - if (args->flags & LINUX_CLONE_PARENT) - thread_link(newtd, p->p_pptr); - else - thread_link(newtd, p); thread_lock(td); /* let the scheduler know about these things. */ _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"