summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorRicardo B. Marlière (SUSE) <ricardo@marliere.net>2026-10-01 09:21:56 -0300
committerChristian Brauner <brauner@kernel.org>2026-10-12 11:23:47 +0200
commit123dcfe87d5f8c9a2ff489545e85c0345de9e21c (patch)
tree48e7927a8d187adcc20241046cfc539466fa5b29 /tools/lib/python
parent168a8c13159c6e3f0f08da6f8fa2f633a91ba9fd (diff)
downloadlinux-next-123dcfe87d5f8c9a2ff489545e85c0345de9e21c.tar.gz
linux-next-123dcfe87d5f8c9a2ff489545e85c0345de9e21c.zip
selftests/namespaces: Wait for thread exit via pidfd in active-ref tests
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. Have the thread open a PIDFD_THREAD pidfd on itself and poll it before pthread_join(). A pidfd becomes readable from exit_notify(), which runs after exit_nsproxy_namespaces(). Fixes: 29f083c49982 ("selftests/namespace: first threaded active reference count test") Fixes: ee861032381b ("selftests/namespace: second threaded active reference count test") Signed-off-by: Ricardo B. Marlière (SUSE) <ricardo@marliere.net> Link: https://patch.msgid.link/20261001-selftests-namespaces-nsid_race-v1-1-25f542cf0b9c@marliere.net Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions