[LTP] tst_clone: Fix child detection on sparc
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Mon Oct 12 13:46:02 CEST 2026
Hi Anders,
On Wed, 30 Sep 2026, Anders Roxell wrote:
> tst_clone: Fix child detection on sparc
> +#ifdef __sparc__
> + if (pid == tid)
> + pid = 0;
> +#endif
High severity: SPARC copy_thread() returns the caller's global TID, but
tst_gettid() returns its namespace-local TID. In pidns05's nested
CLONE_NEWPID path, tid is 1 while pid is the caller's global TID, so the
child still takes the parent branch and the test waits until timeout.
Use a SPARC syscall wrapper that reads the %o1 child indicator instead
of comparing identifiers from different PID namespaces.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list