Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2020 13:56:15 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r364681 - stable/11/sys/compat/linux
Message-ID:  <202008241356.07ODuFjd079947@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008241356.07ODuFjd079947>