Re: [PATCH] selftests/namespaces: Wait for thread exit via pidfd in active-ref tests

From: Christian Brauner

Date: Mon Oct 12 2026 - 05:24:12 EST


On Thu, 01 Oct 2026 09:21:56 -0300, Ricardo B. Marlière (SUSE) wrote:
> pthread_join() returns once exit_mm() wakes the CLEARTID futex, but the
> exiting thread drops its namespace reference later, in
> exit_nsproxy_namespaces(). The joining thread can therefore still see the
> namespace as active, making the final open_by_handle_at() check in
> thread_ns_inactive_after_exit and thread_ns_fd_keeps_active fail
> intermittently.
>
> [...]

Applied to the vfs-7.4.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.4.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.4.misc

[1/1] selftests/namespaces: Wait for thread exit via pidfd in active-ref tests
https://git.kernel.org/vfs/vfs/c/123dcfe87d5f