Author: markj
Date: Mon Aug 24 13:56:15 2020
New Revision: 364681
URL: https://svnweb.freebsd.org/changeset/base/364681

Log:
  MFC r364329:
  Remove "emulation" of clone(CLONE_PARENT | CLONE_THREAD).

Modified:
  stable/11/sys/compat/linux/linux_fork.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linux/linux_fork.c
==============================================================================
--- stable/11/sys/compat/linux/linux_fork.c     Mon Aug 24 13:55:24 2020        
(r364680)
+++ stable/11/sys/compat/linux/linux_fork.c     Mon Aug 24 13:56:15 2020        
(r364681)
@@ -278,6 +278,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);
@@ -339,12 +341,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. */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to