selftests/mm: fix deadlock for fork after pthread_create with atomic_bool
authorEdward Liaw <edliaw@google.com>
Fri, 18 Oct 2024 17:17:24 +0000 (17:17 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 29 Oct 2024 04:40:41 +0000 (21:40 -0700)
commitf2330b650e97a68c1afce66305f10651a9544037
tree71ecec89472e2496b39b8dab93af2a88edc3876d
parent3673167a3a07f25b3f06754d69f406edea65543a
selftests/mm: fix deadlock for fork after pthread_create with atomic_bool

Some additional synchronization is needed on Android ARM64; we see a
deadlock with pthread_create when the parent thread races forward before
the child has a chance to start doing work.

Link: https://lkml.kernel.org/r/20241018171734.2315053-4-edliaw@google.com
Fixes: cff294582798 ("selftests/mm: extend and rename uffd pagemap test")
Signed-off-by: Edward Liaw <edliaw@google.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/uffd-unit-tests.c