Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jun 2018 15:09:24 +0000 (UTC)
From:      Konstantin Belousov <kib@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: r335821 - stable/11/sys/compat/linux
Message-ID:  <201806301509.w5UF9OuU092010@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Jun 30 15:09:24 2018
New Revision: 335821
URL: https://svnweb.freebsd.org/changeset/base/335821

Log:
  MFC r335505:
  linux_clone_thread: mark new thread as TDB_BORN.

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	Sat Jun 30 15:07:44 2018	(r335820)
+++ stable/11/sys/compat/linux/linux_fork.c	Sat Jun 30 15:09:24 2018	(r335821)
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/proc.h>
+#include <sys/ptrace.h>
 #include <sys/racct.h>
 #include <sys/sched.h>
 #include <sys/syscallsubr.h>
@@ -349,6 +350,9 @@ linux_clone_thread(struct thread *td, struct linux_clo
 	thread_unlock(td);
 	if (P_SHOULDSTOP(p))
 		newtd->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK;
+	
+	if (p->p_ptevents & PTRACE_LWP)
+		newtd->td_dbgflags |= TDB_BORN;
 	PROC_UNLOCK(p);
 
 	tidhash_add(newtd);



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