linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] selftests/mm: fix deadlock after pthread_create
@ 2024-10-03 21:17 Edward Liaw
  2024-10-03 21:17 ` [PATCH 1/2] selftests/mm: replace atomic_bool with pthread_barrier_t Edward Liaw
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Edward Liaw @ 2024-10-03 21:17 UTC (permalink / raw)
  To: linux-kselftest, Andrew Morton, Shuah Khan, Lokesh Gidra,
	Edward Liaw, Peter Xu
  Cc: linux-kernel, kernel-team, linux-mm

On Android arm, pthread_create followed by a fork caused a deadlock in
the case where the fork required work to be completed by the created
thread.

Updated the synchronization primitive to use pthread_barrier instead of
atomic_bool.

Applied the same fix to the wp-fork-with-event test.

Edward Liaw (2):
  selftests/mm: replace atomic_bool with pthread_barrier_t
  selftests/mm: fix deadlock for fork after pthread_create on ARM

 tools/testing/selftests/mm/uffd-common.c     |  5 +++--
 tools/testing/selftests/mm/uffd-common.h     |  3 +--
 tools/testing/selftests/mm/uffd-unit-tests.c | 21 ++++++++++++++------
 3 files changed, 19 insertions(+), 10 deletions(-)

--
2.46.1.824.gd892dcdcdd-goog



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-10-18 17:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-03 21:17 [PATCH 0/2] selftests/mm: fix deadlock after pthread_create Edward Liaw
2024-10-03 21:17 ` [PATCH 1/2] selftests/mm: replace atomic_bool with pthread_barrier_t Edward Liaw
2024-10-06 17:53   ` Muhammad Usama Anjum
2024-10-18 14:37   ` Ryan Roberts
2024-10-18 17:17     ` Edward Liaw
2024-10-03 21:17 ` [PATCH 2/2] selftests/mm: fix deadlock for fork after pthread_create on ARM Edward Liaw
2024-10-04 23:54 ` [PATCH 0/2] selftests/mm: fix deadlock after pthread_create Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox