cpu_set_upcall / linux_clone_thread: Remove calls to cpu_thread_clean

This is intended to clean state of a thread at the end of its
lifecycle during wait(), not the beginning of its life cycle.

Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D48023

(cherry picked from commit 0e742cc77454d0872ac2f6e7fd755b6d0322b711)
This commit is contained in:
John Baldwin 2025-01-03 11:03:08 -05:00
parent 0cfebe47d9
commit 939bcd2c20
3 changed files with 0 additions and 22 deletions

View file

@ -617,16 +617,6 @@ int
cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg,
stack_t *stack)
{
/*
* Do any extra cleaning that needs to be done.
* The thread may have optional components
* that are not present in a fresh thread.
* This may be a recycled thread so make it look
* as though it's newly allocated.
*/
cpu_thread_clean(td);
#ifdef COMPAT_FREEBSD32
if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) {
/*

View file

@ -301,8 +301,6 @@ linux_clone_thread(struct thread *td, struct l_clone_args *args)
else
em->child_clear_tid = NULL;
cpu_thread_clean(newtd);
linux_set_upcall(newtd, args->stack);
PROC_LOCK(p);

View file

@ -492,16 +492,6 @@ int
cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg,
stack_t *stack)
{
/*
* Do any extra cleaning that needs to be done.
* The thread may have optional components
* that are not present in a fresh thread.
* This may be a recycled thread so make it look
* as though it's newly allocated.
*/
cpu_thread_clean(td);
/*
* Set the trap frame to point at the beginning of the entry
* function.